Bug related to pixel formats, the array was being overwritten