fix secondary indexes