Issue fixed, as you've said, the values were going negative, I've simply constrained them 0, 255 Thanks for help