fixing issue where the duration calculations were negative because I was...

... subtracting the end time from the start time.