Out of bound crop box bug fixed.

When the sides of the crop box were out of the image, a segmentation
fault would occur. This is fixed now and the crop box is adjusted to
the size of the overlap.