diff --git a/applications/solvers/multiphase/bubbleFoam/wallFunctions.H b/applications/solvers/multiphase/bubbleFoam/wallFunctions.H
index a998d4c3ddcbffaa744b87b67a7eebd9f4b36524..bc9e93c63dfda8a7cebd087277b66547b16f7bf2 100644
--- a/applications/solvers/multiphase/bubbleFoam/wallFunctions.H
+++ b/applications/solvers/multiphase/bubbleFoam/wallFunctions.H
@@ -34,7 +34,7 @@
         {
             const scalarField& nuw = nutb.boundaryField()[patchi];
 
-            scalarField magFaceGradU(mag(U.boundaryField()[patchi].snGrad()));
+            scalarField magFaceGradU(mag(Ub.boundaryField()[patchi].snGrad()));
 
             forAll(currPatch, facei)
             {