Added a kill listener that emits a close event