diff --git a/src/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C b/src/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C
index e2ed65c..706bcee 100644
--- a/src/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C
+++ b/src/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C
@@ -56,12 +56,19 @@ void Foam::functionObjects::nearWallFields::createFields
                 label sz = sflds.size();
                 sflds.setSize(sz+1);
 
-                IOobject io(fld);
-                io.readOpt() = IOobject::NO_READ;
-                io.writeOpt() = IOobject::NO_WRITE;
-                io.rename(sampleFldName);
-
-                sflds.set(sz, new VolFieldType(io, fld));
+                sflds.set(sz,
+                    new VolFieldType(
+                            IOobject(
+                                sampleFldName,
+                                time_.timeName(),
+                                mesh_,
+                                IOobject::NO_READ,
+                                IOobject::AUTO_WRITE
+                            ),
+                            mesh_,
+                            fld.dimensions()
+                    )
+                );
 
                 Log << "    created " << sflds[sz].name()
                     << " to sample " << fld.name() << endl;
