Fixes java.util.ConcurrentModificationException

Fixes java.util.ConcurrentModificationException when adding events inside onEvent