Fix unstage_patch by reversing applying patch