need to remove listener before the component unmounts