fix index_tuple implementation