Fixed a bug where progressbar would not reset