fixed errors in chart_scripts