fixed a stupid thing with index