some fixes to getAllCourses, work is still in progress