two time calculation fixes