Fixing time calculation.