Fix time estimation code.