Fixed bug in bar rendering

TODO: stacked bars