bug fix when multiple events overlap or are end to end.