Fix progress calculation