fixed charts.R