Fixed the gradient with events with an unsure ending time.