fixed handling of overtimes in calculating time