onExit & deregisterName