Fixed index issues