fixed a bug with the progress bar