Fixed bug where progress bar would freeze