Fix a bug with grades edition.