diff --git a/src/space.c b/src/space.c
index 24d878b3132f6a17dc319dd906ff769f44ce5099..0e789e79e8ed95f17904703c39a3fe75f3cf1b56 100644
--- a/src/space.c
+++ b/src/space.c
@@ -1175,7 +1175,7 @@ void space_rebuild(struct space *s, int repartitioned, int verbose) {
       nodes[i] = numanode;
 //      swiftnuma_cell_move_hydro_parts(&cells_top[i],numanode,1);
     }
-    threadpool_map(s->e->tp, &swiftnuma_cell_move_hydro_parts_threadpool_map, s->c, s->nr_cells,
+    threadpool_map(s->e->threadpool, &swiftnuma_cell_move_hydro_parts_threadpool_map, s->cells_top, s->nr_cells,
                       sizeof(struct cell), 0, nodes);
     free(nodes);
 #endif