when using rewire, revert when done