fix chart.js bug