Fix progress bar bug