fixed onEvent not being called when no listeners on the type are
registered