Fixing index issue