Fixed bug regarding progressbar