Fixed a problem when reseting the clock.