Undo patches in one go. by @kansface. Fixes #39