closed #4160: Out of range exception in EventDispatcher