Changed progress bar.
Added some logic