CHanged the image croping logic a little bit