Fixes bug in EventManager.