Fix course grading script bug