Position index
Some bugs