fixed grade bug