fixed bug in loadCourses