Corrected bug in bar percentage when the bar is almost full