fix boundary cropping