fixed invocation of eventListeners when duplicate events were emitted
new version