Fixed a bug with pie charts