Tiny bugfix in the event firing