Problem with the update of the progress bar