Fix issue 148

don't use global pos variable name, instead use another local variable name

ps: sorry for badly name variables