Fixed calculation of tardiness.