fix a protential issue for get_position_courses if number want to get is larger than course numbers.