Fixed bug in getCourseByCode