fixed sorting: same start time but different end time. fixes #97.