some bug fixes with progressbar