Fix another case where index is not properly updated