fix exception in course api