fixed the chart bug