Fix a problem in image cropping.