ensure only the correct events are emitted