Fix a minor bug in the progress bar helper