fixed the email close listener, and handler