fix bug in join_course