diff --git a/src/gpu/VirtualFluids_GPU/GPU/CalcMac27.cu b/src/gpu/VirtualFluids_GPU/GPU/CalcMac27.cu
index ce6e034d1c1eee57e062b736cfcea97e07306f3c..42d0a6f4aff4a85d4912d0dcdf73e30b6bee9eb9 100644
--- a/src/gpu/VirtualFluids_GPU/GPU/CalcMac27.cu
+++ b/src/gpu/VirtualFluids_GPU/GPU/CalcMac27.cu
@@ -273,15 +273,15 @@ extern "C" __global__ void LBCalcMacCompSP27(real *vxD, real *vyD, real *vzD, re
     if(k >= size_Mat)
         return;
 
-    if (!vf::gpu::isValidFluidNode(geoD[k]))
-        return;
-
     pressD[k] = c0o1;
     rhoD[k]   = c0o1;
     vxD[k]    = c0o1;
     vyD[k]    = c0o1;
     vzD[k]    = c0o1;
 
+    if (!vf::gpu::isValidFluidNode(geoD[k]))
+        return;
+
     vf::gpu::DistributionWrapper distr_wrapper(distributions, size_Mat, isEvenTimestep, k, neighborX, neighborY,
                                                neighborZ);
     const auto &distribution = distr_wrapper.distribution;