diff --git a/dune/tectonic/myconvexproblem.hh b/dune/tectonic/myconvexproblem.hh
index 811274a5d5b9ee2d65e4f7c6a37f4885ef8ea764..38b726be9628c97a0fc896103278e8362cb26223 100644
--- a/dune/tectonic/myconvexproblem.hh
+++ b/dune/tectonic/myconvexproblem.hh
@@ -22,7 +22,7 @@ class MyConvexProblem {
       \param u The solution vector
   */
   MyConvexProblem(MatrixType const &A,
-                  Dune::GlobalNonlinearity<block_size> &phi,
+                  Dune::GlobalNonlinearity<block_size> const &phi,
                   VectorType const &f, VectorType &u)
       : A(A), phi(phi), f(f), u(u) {};
 
diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 0e369ec4408d5c0641386d8350782a1ead0fffe3..6dfeee08b31acadae9029ed3b05dd7ca84506b6f 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -137,7 +137,7 @@ void assemble_frictional(
 
 void assemble_nonlinearity(
     int size, Dune::ParameterTree const &parset,
-    Dune::shared_ptr<Dune::GlobalNonlinearity<dim>> &myGlobalNonlinearity,
+    Dune::shared_ptr<Dune::GlobalNonlinearity<dim> const> &myGlobalNonlinearity,
     std::vector<Dune::FieldVector<double, 1>> &nodalIntegrals) {
   // {{{ Assemble terms for the nonlinearity
   std::vector<double> mu;
@@ -164,12 +164,14 @@ void assemble_nonlinearity(
 
     auto const tmp = new Dune::GlobalRuinaNonlinearity<dim>(
         nodalIntegrals, a, mu, eta, normalStress);
-    myGlobalNonlinearity = Dune::shared_ptr<Dune::GlobalNonlinearity<dim>>(tmp);
+    myGlobalNonlinearity =
+        Dune::shared_ptr<Dune::GlobalNonlinearity<dim> const>(tmp);
   } else if (friction_model == std::string("Laursen")) {
     auto const tmp =
         new Dune::GlobalLaursenNonlinearity<dim, Dune::LinearFunction>(
             mu, normalStress, nodalIntegrals);
-    myGlobalNonlinearity = Dune::shared_ptr<Dune::GlobalNonlinearity<dim>>(tmp);
+    myGlobalNonlinearity =
+        Dune::shared_ptr<Dune::GlobalNonlinearity<dim> const>(tmp);
   } else {
     assert(false);
   }
@@ -277,7 +279,8 @@ int main(int argc, char *argv[]) {
       stiffnessMatrix.mmv(u2, b2);
       stiffnessMatrix.mmv(u3, b3);
 
-      Dune::shared_ptr<Dune::GlobalNonlinearity<dim>> myGlobalNonlinearity;
+      Dune::shared_ptr<Dune::GlobalNonlinearity<dim> const>
+      myGlobalNonlinearity;
       assemble_nonlinearity(grid.size(grid.maxLevel(), dim), parset,
                             myGlobalNonlinearity, nodalIntegrals);
       // }}}