emit exit after close

fixed in 4f3ee94