fixed an edge case where the final section in a course could get omitted from report