Added collate_idxs