fix cropping and edit bugs