Fixed get_indices