Possible fix for charts_controller.rb