diff --git a/src/compute-disc-error.cc b/src/compute-disc-error.cc
index 66f9b4960b1bdc6f48bf41fe10c9c0c86ffe3557..2713df08c39f693fe92169312b8ebc7fd3b7e821 100644
--- a/src/compute-disc-error.cc
+++ b/src/compute-disc-error.cc
@@ -444,7 +444,7 @@ void measureAnalyticalEOC(const GridView gridView,
   /////////////////////////////////////////////////////////////////
 
   // Read reference solution and its derivative into a PythonFunction
-  typedef VirtualDifferentiableFunction<FieldVector<double, dim>, typename TargetSpace::CoordinateType> FBase;
+  typedef VirtualDifferentiableFunction<FieldVector<double, dimworld>, typename TargetSpace::CoordinateType> FBase;
 
   Python::Module module = Python::import(parameterSet.get<std::string>("referenceSolution"));
   auto referenceSolution = module.get("fdf").toC<std::shared_ptr<FBase>>();