Fixes some bugs with cropping