fix grade bug