fixed bug that would crash courses page after created a course