Hi there. I'v been trying to figure out what's wrong in this code, that I can't pick object correctly if object is even number, but it works perffectly with odd numbers

. I have a poor solution with a hidden object checking for collision, but I don't like that. Any idea?
autocam off
sync on
screen=1000
make object plain screen,300,300
position object screen,0,0,2
color object 1000,rgb(0,255,0)
for i= 1 to 10
make object box i,4,4,1
position object i,rnd(30),i*10,0
next i
position camera 0,50,-150
point camera 0,0,0
do
ink rgb(255,255,255),0 :set cursor 0,0:print "Try to move objects"
ob=pick object (mousex(),mousey(),1,10)
if ob>0 then set cursor mousex()+6,mousey():print ob
for i= 1 to 10
if pick object (mousex(),mousey(),i,i) and mouseclick() then position object ob,nx#,ny#,0
next i
clicked=PICK OBJECT(mousex(),mousey(),screen,screen)
nx#=GET PICK VECTOR X()+camera position x()
ny#=GET PICK VECTOR Y()+camera position Y()
control camera using arrowkeys 0,2,0
sync
loop
Cheers.
I'm not a grumpy grandpa
