Fixed bug in timing calculation.