revert handlers in destructor