Fixed bug for events with start and end times