diff --git a/dune/fem-dg/assemble/primalmatrix.hh b/dune/fem-dg/assemble/primalmatrix.hh
index 954261c4b848bfc03a0ddbbfa94e31cc8ffc05bb..aae7aa97221596dbbe2aa347629d915bf33ac1c6 100644
--- a/dune/fem-dg/assemble/primalmatrix.hh
+++ b/dune/fem-dg/assemble/primalmatrix.hh
@@ -8,6 +8,8 @@
 #include <dune/fem-dg/operator/fluxes/dgprimalfluxes.hh>
 #include <dune/fem-dg/operator/dg/primaloperator.hh>
 
+#include <dune/fem/misc/compatibility.hh>
+
 namespace Dune {
 
 template <class ModelType>
@@ -676,8 +678,7 @@ class DGPrimalMatrixAssembly
     // make sure we got the right conforming statement
     assert( intersection.conforming() == conforming );
 
-    typename EntityType::EntityPointer ep = intersection.outside();
-    const EntityType& neighbor = *ep ;
+    const EntityType& neighbor = Dune::Fem::make_entity( intersection.outside() );
 
     const int entityOrder   = dfSpace.order( entity );
     const int neighborOrder = dfSpace.order( neighbor );
@@ -847,8 +848,8 @@ class DGPrimalMatrixAssembly
         const IntersectionType& intersection = *iit ;
         if ( !intersection.neighbor() )
           continue;
-        typename EntityType::EntityPointer ep = intersection.outside();
-        const EntityType& neighbor = *ep ;
+
+        const EntityType& neighbor = Dune::Fem::make_entity( intersection.outside() );
 
         LocalMatrixType localOpNb1 = matrix.localMatrix( entity, neighbor );
         LocalMatrixType localOpNb2 = matrix.localMatrix( neighbor, entity );
diff --git a/dune/fem-dg/stepper/ellipticalgorithm.hh b/dune/fem-dg/stepper/ellipticalgorithm.hh
index b925560fb35fb26d2f1a5e1538d2ea6e0c95306f..32820bcbcb0df11a232c3cde70e231065e2fefb2 100644
--- a/dune/fem-dg/stepper/ellipticalgorithm.hh
+++ b/dune/fem-dg/stepper/ellipticalgorithm.hh
@@ -223,8 +223,9 @@ public:
       typedef typename Operator :: FaceQuadratureType  FaceQuadratureType ;
       typedef Dune::Fem::IntersectionQuadrature< FaceQuadratureType, conforming > IntersectionQuadratureType;
       typedef typename IntersectionQuadratureType :: FaceQuadratureType QuadratureImp;
-      const typename EntityType::EntityPointer pOutside = intersection.outside();
-      const EntityType &outside = *pOutside;
+
+      const EntityType &outside = Dune::Fem::make_entity( intersection.outside() );
+
       typename DF::LocalFunctionType uOutside = df_.localFunction(outside);
 
       const int enOrder = df_.space().order( entity );