fixed cropping bug in preprocessing