diff --git a/dune/fufem/boundarypatchprolongator.hh b/dune/fufem/boundarypatchprolongator.hh
index 6be766c53f892059e327d1011999f70df26ca316..99a0bb9f2866259168899a911629d557f78b39c1 100644
--- a/dune/fufem/boundarypatchprolongator.hh
+++ b/dune/fufem/boundarypatchprolongator.hh
@@ -69,7 +69,7 @@ public:
         for (int i=1; i<=maxLevel; i++)
             patches[i]->setup(grid.levelGridView(i));
 
-        for (const auto& pIt : patches[0])
+        for (const auto& pIt : *patches[0])
         {
             const Element& inside = pIt.inside();
 
diff --git a/dune/fufem/differencenormsquared.hh b/dune/fufem/differencenormsquared.hh
index 9d62b0af67e87f9d6f132c4996582b92d03c748b..e2d79896d7e4f48457a1a14f5b154918cef9cec2 100644
--- a/dune/fufem/differencenormsquared.hh
+++ b/dune/fufem/differencenormsquared.hh
@@ -136,7 +136,7 @@ public:
                 LevelMultipleCodimMultipleGeomTypeMapper<GridType,Dune::MCMGElementLayout> adaptiveP0Mapper(sourceGrid, 0);
                 int coarseIndex = uniformP0Mapper.map(element);
 
-                typename GridType::LevelGridView sourceLevelView = sourceGrid.levelView(0);
+                typename GridType::LevelGridView sourceLevelView = sourceGrid.levelGridView(0);
 
                 for (auto&& adaptE : elements(sourceLevelView))
                     if (adaptiveP0Mapper.map(adaptE) == coarseIndex) {
@@ -176,7 +176,7 @@ public:
                 //   Sample adaptive function
                 // ////////////////////////////////////////////////////////////////////////
                 sourceFunction.evaluateLocal(element, pos,
-                                            target[indexSet.subIndex(*eIt,i,dim)]);
+                                            target[indexSet.subIndex(e,i,dim)]);
 
             }
 
diff --git a/dune/fufem/improvegrid.hh b/dune/fufem/improvegrid.hh
index 3110fc6249c26e333a82a729efc08865f8bf2e92..ad75b1bc6c491853127791a7fa5c0c8b48d97ecc 100644
--- a/dune/fufem/improvegrid.hh
+++ b/dune/fufem/improvegrid.hh
@@ -126,7 +126,7 @@ void improveGrid(GridType& grid, double threshold)
 
     for (; eIt!=eEndIt; ++eIt) {
 
-        const Entity& father = eIt->father();
+        const EntityType& father = eIt->father();
 
         const typename GridType::template Codim<0>::LocalGeometry geometryInFather = eIt->geometryInFather();
         for (size_t i=0; i<eIt->subEntities(dim); i++) {
diff --git a/dune/fufem/prolongboundarypatch.hh b/dune/fufem/prolongboundarypatch.hh
index 1406e621baf6dab88c7e8abd864b4f968b0ec785..ec506b56cc2a4c41e901b73b790dbcba273c8857 100644
--- a/dune/fufem/prolongboundarypatch.hh
+++ b/dune/fufem/prolongboundarypatch.hh
@@ -160,7 +160,7 @@ public:
             for (const auto& i : intersections(levelView,e)) {
 
                 // if the element is a boundary element
-                if (patches[0].contains(nIt)) {
+                if (patches[0].contains(i)) {
 
                     // /////////////////////////////////////////////////////////////////
                     //   This version actually only works for UGGrids, but it works
@@ -248,7 +248,7 @@ public:
             for (const auto& i : intersections(levelView,e)) {
 
                 // if the element is a boundary element
-                if (coarsePatch.contains(nIt)) {
+                if (coarsePatch.contains(i)) {
 
                     // /////////////////////////////////////////////////////////////////
                     //   This version actually only works for UGGrids, but it works
diff --git a/dune/fufem/sampleonbitfield.hh b/dune/fufem/sampleonbitfield.hh
index c2601d4cc4374df2b5737c1189f339938f5035f6..317f0425e609fc93f3c99b598d875d5d228f8d5b 100644
--- a/dune/fufem/sampleonbitfield.hh
+++ b/dune/fufem/sampleonbitfield.hh
@@ -36,8 +36,9 @@ void sampleOnBitField(const GridType& grid,
     assert((int) dirichletValues[0].size()==grid.size(0,dim));
 
     // Construct GridFunction
+    typename GridType::LevelGridView levelView = grid.levelGridView(0);
     typedef P1NodalBasis<typename GridType::LevelGridView> P1Basis;
-    P1Basis p1Basis(grid.levelGridView(0));
+    P1Basis p1Basis(levelView);
     BasisGridFunction<P1Basis, VectorType> coarseFunction(p1Basis, dirichletValues[0]);
 
     // Set array sizes correctly
@@ -142,7 +143,7 @@ void sampleOnBitField(const GridType& grid,
             coarseFunction.evaluateLocal(element, pos, tmp);
 
             for (int j=0; j<blocksize; j++)
-                 if (dirichletNodes[eIt->level()][fIdx][j])
+                 if (dirichletNodes[e.level()][fIdx][j])
                      fineDirichletValues[fIdx][j] = tmp[j];
         }
 
@@ -189,7 +190,7 @@ void sampleOnBitField(const GridType& grid,
 
         for (size_t i=0; i<e.subEntities(dim); i++) {
 
-            int fIdx = indexSet().subIndex(e, i, dim);
+            int fIdx = indexSet.subIndex(e, i, dim);
 
             // Logical position of the fine grid lagrange point
             // in local coordinates of the coarse grid element