fixed bugs for add grade