fix npe when create course.