Fix bug with barchart.