fix some image cropping problems