shouldn't it be after "if (!registeredEvents[this.eventName])" ?