Fix retrieval of indices.