Fixed bug in progressbar