remove eventlistener in onExit