fix bar chart bug