Fix position code