Fix bug where chart wouldn't display properly