critical bugfix for monochrome images