Fixed a bug with progress bar