Average time calculation bug fixed