Fixed another bug involving chart generation