diff --git a/dune/fufem/boundarypatch.hh b/dune/fufem/boundarypatch.hh
index 55b88694187f8711f99674d503c3133bf37d1b93..f99d433c61fa56f64dda3f0d97a996ba2cc0340f 100644
--- a/dune/fufem/boundarypatch.hh
+++ b/dune/fufem/boundarypatch.hh
@@ -187,7 +187,7 @@ public:
         const auto inside = i.inside();
         int localFaceIndex = i.indexInInside();
 
-        const Dune::ReferenceElement<double,dim>& refElement = Dune::ReferenceElements<double, dim>::general(inside.type());
+        const auto& refElement = Dune::ReferenceElements<double, dim>::general(inside.type());
 
         // Get global node ids
         int n = refElement.size(localFaceIndex, 1, dim);
@@ -401,8 +401,7 @@ public:
             return false;
         if (codim==1)
             return this->faces_[mapper_->subIndex(en, subEntity, 1)][0];
-        const Dune::ReferenceElement<double,GridView::dimension>& refElement
-            = Dune::ReferenceElements<double, GridView::dimension>::general(en.type());
+        const auto& refElement = Dune::ReferenceElements<double, GridView::dimension>::general(en.type());
 
         for (int faceIdx = 0; faceIdx<refElement.size(1); ++faceIdx)
         {
@@ -518,7 +517,7 @@ public:
         // loop over all elements
         for (const auto& e : elements(*gridView_)) {
 
-            const Dune::ReferenceElement<double,dim>& refElement = Dune::ReferenceElements<double, dim>::general(e.type());
+            const auto& refElement = Dune::ReferenceElements<double, dim>::general(e.type());
 
             // Loop over all neighbors
             for (const auto& is : intersections(*gridView_,e)) {
@@ -573,7 +572,7 @@ public:
         // loop over all elements
         for (const auto& e : elements(*gridView_)) {
 
-            const Dune::ReferenceElement<double,dim>& refElement = Dune::ReferenceElements<double, dim>::general(e.type());
+            const auto& refElement = Dune::ReferenceElements<double, dim>::general(e.type());
 
             // Loop over all neighbors
             for (const auto& is : intersections(*gridView_,e)) {
@@ -648,8 +647,7 @@ public:
         for (; it!=endIt; ++it) {
             const auto inside = it->inside();
 
-            const Dune::ReferenceElement<double,dim>& refElement
-                = Dune::ReferenceElements<double, dim>::general(inside.type());
+            const auto& refElement = Dune::ReferenceElements<double, dim>::general(inside.type());
 
             // Compute actual surface normals
             int n = refElement.size(it->indexInInside(),1,dim);