Bugfix: events can change during iteration