call removeListener on close