Clean up the handler.