fix handling of events without end time.