Properly remove event listener