rearrange the patch to fix error during applying