Fixing the getPos functions.