emit exit after close