Cleaning up the handler.