Duplicates in result of query

Hi, I have created query based on tigergraph all paths query, but after I got all paths I need to print every vertex information for each path so I wrote this code:

SumAccum<INT> @order_num = 0;
    SetAccum<VERTEX> @@printset_final;
    SetAccum<VERTEX> @@printset;
    FOREACH i IN RANGE[0,@@total_path_list.size()-1] DO
      FOREACH j IN RANGE[0,@@total_path_list.get(i).size()-1] DO
        @@printset += @@total_path_list.get(i).get(j);
        @@printset_final += @@total_path_list.get(i).get(j);
        selset = {@@printset};
        tmp = SELECT v FROM selset:v POST-ACCUM v.@order_num = j;
        @@printset.clear();
      END;
      all_paths_all_info_set = {@@printset_final};
      results = SELECT v FROM all_paths_all_info_set:v ORDER BY v.@order_num;
      PRINT results;
      @@printset_final.clear();
      @@printset.clear();
    END;

I dont understand why but result of this cycles will print first path correctly but then in each other path it will print duplicates of vertices it went through in previous list. I tried printing all_paths_all_info_set, accumulators etc. and all of them had correct values without duplicates, so I rellay do not understand what is causing problem.