barWidth <= 0 fix