getHeadPos fixed