fixed setpos bug.