Fix stackpos bug