fixed nullpointer when there are no event types