possible fix for duplicate grades (nice and hacky)