fix bug: correct setting pos value