Fixed an error in the calculation of the time.