bug fixes for pie chart model