diff --git a/src/cell.c b/src/cell.c
index 3acd5ac00f596266d2830bc45d1f7c0524c941eb..43bb067ab6beccbcb28c7c6a0e2f07d3f6d22fd5 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -1359,7 +1359,7 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj,
                ci->dmin &&
            2.f * kernel_gamma * space_stretch *
                    (cj->h_max_old + cj->dx_max_old) <
-               ci->dmin) {
+               cj->dmin) {
 
     /* Get the type of pair if not specified explicitly. */
     double shift[3];