MDL-47011 core_grade: bug fixes to natural weights setup screen code