fixing the grading rule bug