Better progress bar calculation