fixes a problem with the image minimization