fix for RGB tif images

Still needs a check