MDL-46576 core_grade: Misc bugs I have mangaged to fix.