fix bug for charts