Renamed table_idx to table_index