add extra check on Diff patch method