Fixed bug in sum_durations