fixed bug in chart_scripts