fixed sometimes progress was NaN