Fix to computeGrade