FIxing a minor bug with chart generation