fixed patch slicing bugs in patch_splitMax function