fix pie chart error