Make sure the event list is sorted by event state.