fix bugs on progressbar