diff --git a/src/velociraptor_interface.c b/src/velociraptor_interface.c
index 5cd4566ecadd7701f9f9e4f71fd1d3c0a61943d8..6e2f4e298f9ab963fcf9871d27388a1ef0a2eeb6 100644
--- a/src/velociraptor_interface.c
+++ b/src/velociraptor_interface.c
@@ -485,6 +485,7 @@ void velociraptor_invoke(struct engine *e, const int linked_with_snap) {
 
     const double Omega_m = e->cosmology->Omega_m;
     const double Omega_b = e->cosmology->Omega_b;
+    const double critical_density_0 = e->cosmology->critical_density_0;
 
     /* Linking length based on the mean DM inter-particle separation
      * in the zoom region and assuming the mean density of the Universe