Fix chart generation