added fix to bar graphs for number of bars