Fix the logical issue for set origion position in first iter