Corrected a small bug on the progressbar