Changes to fix the pixel detection.