Fix gem_t_index tool
Fix tool tests