Fixed bug time spent calculation.