Fix setpos error (#49)