Make the correct method call when deregistering an event listener