fix computation of progress