fixed a couple things with index