fix parameters handling in objectPosition function