Fix bug for bar chart