Fixed bug when cropping region from uploaded image