Fix for infinite loop.

Fix for infinite loop that appears if cropper is in some positions.