Used new pie chart implementation inside code and fixed borderline cases