There were two bugs in the grading system: the first was preventing proper calculation in the Desert stages - you take regular damage from the heat, and that was counting towards Hits Taken and lowering the grade. The second was causing a newer, but lower, grade for a stage to overwrite a previous high score grade.
Both of these have been fixed.