Improve progress calculation