Fix bug with grayscale images. FU Java, just FU