Fixed a bug with chart