Fixed bug with pixels not being cleared