fixed up progress bar code