diff --git a/src/assemblers.cc b/src/assemblers.cc
index 7194effe5cd4ea094d00592a6e7fa0cff3c8b0a1..3f40e11985c3aeb3d422b4d6a71d48a79fa66bf5 100644
--- a/src/assemblers.cc
+++ b/src/assemblers.cc
@@ -58,11 +58,13 @@ assemble_frictional(GridView const &gridView, FEBasis const &feBasis,
 template <class VectorType, class MatrixType>
 Dune::shared_ptr<Dune::GlobalNonlinearity<VectorType, MatrixType> const>
 assemble_nonlinearity(
-    int size, Dune::ParameterTree const &parset,
+    Dune::ParameterTree const &parset,
     Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>>
         nodalIntegrals,
     Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>> state,
     double h) {
+  auto const size = (*nodalIntegrals).size();
+
   typedef Dune::BlockVector<Dune::FieldVector<double, 1>> SingletonVectorType;
   // {{{ Assemble terms for the nonlinearity
   auto mu = Dune::make_shared<SingletonVectorType>(size);
diff --git a/src/assemblers.hh b/src/assemblers.hh
index 4d44efd59da836cffea2c5c4d85c222a518b153a..9c7b5579d6c166842a4660ecb686e3e2e8e0801d 100644
--- a/src/assemblers.hh
+++ b/src/assemblers.hh
@@ -25,7 +25,7 @@ assemble_frictional(GridView const &gridView, FEBasis const &feBasis,
 template <class VectorType, class MatrixType>
 Dune::shared_ptr<Dune::GlobalNonlinearity<VectorType, MatrixType> const>
 assemble_nonlinearity(
-    int size, Dune::ParameterTree const &parset,
+    Dune::ParameterTree const &parset,
     Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>>
         nodalIntegrals,
     Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>> state,
diff --git a/src/assemblers_tmpl.cc b/src/assemblers_tmpl.cc
index cb02a52c41cd8359457d23a27867234f6351cbee..6123cd5f89374af053c058e05e35a5e773c15c57 100644
--- a/src/assemblers_tmpl.cc
+++ b/src/assemblers_tmpl.cc
@@ -30,7 +30,7 @@ assemble_frictional<GridType2, GridView2, SmallVector2, P1Basis2>(
 template Dune::shared_ptr<
     Dune::GlobalNonlinearity<VectorType2, OperatorType2> const>
 assemble_nonlinearity<VectorType2, OperatorType2>(
-    int size, Dune::ParameterTree const &parset,
+    Dune::ParameterTree const &parset,
     Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>>
         nodalIntegrals,
     Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>> state,
@@ -61,7 +61,7 @@ assemble_frictional<GridType3, GridView3, SmallVector3, P1Basis3>(
 template Dune::shared_ptr<
     Dune::GlobalNonlinearity<VectorType3, OperatorType3> const>
 assemble_nonlinearity<VectorType3, OperatorType3>(
-    int size, Dune::ParameterTree const &parset,
+    Dune::ParameterTree const &parset,
     Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>>
         nodalIntegrals,
     Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>> state,
diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 9716d8a881a9f6635c2242182fa5bdec056b9937..568349e90cdc044c1eceba1845d03792f4dd1ad4 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -277,8 +277,7 @@ int main(int argc, char *argv[]) {
              ++state_fpi) {
           auto myGlobalNonlinearity =
               assemble_nonlinearity<VectorType, OperatorType>(
-                  finestSize, parset.sub("boundary.friction"), nodalIntegrals,
-                  s4_new, h);
+                  parset.sub("boundary.friction"), nodalIntegrals, s4_new, h);
           MyConvexProblemType const myConvexProblem(stiffnessMatrix,
                                                     *myGlobalNonlinearity, b4);