Fix bug with progress bar