Corrected the time prediction algorithm.