Fixed bug with progress bar