Fix image cropping error