Fixed Scala implementation of EventManager.