fixing index issues.