Fix for image crop bug