unload eventlisteners on popup closing