Fixed bugs in ProgressBar