Fixed progress bar value calculation logic