fixed calculation for progress