Fixed race condition in EventMonitor