Fixed missing removal of event listener.