Fix a bug with grades modifications.