check patch_delta bounds more carefully