Fixed a bug in pie chart update