BUG: createPatch: cleanup