compilation seems better, fix some bugs for has_cycles and a trying for tri_topo