Fix test for xpos calculation