Crash fixed in pie chart