 		index_t current_seed;
 		int ns;
 		while (to_visit_pos){
-			current_seed = to_visit[to_visit_pos - 1];
+			current_seed = to_visit[idx][to_visit_pos - 1];
 			to_visit_pos--;
 			
 			intersection_clip_facet_SR(

			{
				ns = current_polygon.vertex[v].neigh_s;
				
				if (ns != -1 && ns >= 0 && ns < points_nb)
				{
					for (index_t ii = 0; ii < has_visited_nb[facetidx_in_block]; ++ii)
					{

			<< "Starting cudaMalloc..\n";
		host_ret_ = (double*)malloc(sizeof(double) * points_nb_ * (dimension_ + 1));
		//host_ret_ = (double*)malloc(sizeof(double) * facet_nb_ * 10 * 40);
		//cudaMalloc((void**)&dev_seeds_info_, DOUBLE_SIZE * points_nb_ * (dimension_ + 1));
		//cudaMemcpyToSymbol(g_seeds_information, &dev_seeds_info_, sizeof(double*), size_t(0), cudaMemcpyHostToDevice);
		//cudaMalloc((void**)&dev_seeds_poly_nb, INT_SIZE * points_nb_);
		//cudaMemcpyToSymbol(g_seeds_polygon_nb, &dev_seeds_poly_nb, sizeof(int*), size_t(0), cudaMemcpyHostToDevice);

		switch (mode)
		{
