fix npe
destroy listener after it is not needed anymore