Fixed a Bug in EventManager