Fix setPixel* functions