Fix a few places where the index wasn't properly updated