correctly get pointer position