Fixed progress calculation bug