Fix index issues