diff --git a/dune/gfe/parallel/globalp1mapper.hh b/dune/gfe/parallel/globalp1mapper.hh
index ae8dc65353cf080c71b0859390b8579d30bf019c..12443dbe5b10545f93d4b2116bd9b20a66a46ca9 100644
--- a/dune/gfe/parallel/globalp1mapper.hh
+++ b/dune/gfe/parallel/globalp1mapper.hh
@@ -53,7 +53,11 @@ namespace Dune {
         for (size_t i=0; i<it->template count<dim>(); i++)
 #endif
         {
+#if DUNE_VERSION_NEWER(DUNE_GRID,2,4)
+          int localIndex  = p1Mapper_.subIndex(*it, i, dim);
+#else
           int localIndex  = p1Mapper_.map(*it, i, dim);
+#endif
           int globalIndex = globalVertexIndexSet.subIndex(*it, i, dim);
 
           localGlobalMap_[localIndex]  = globalIndex;
@@ -71,7 +75,11 @@ namespace Dune {
     template <class Entity>
     Index subIndex(const Entity& entity, uint i, uint codim) const
     {
+#if DUNE_VERSION_NEWER(DUNE_GRID,2,4)
+      int localIndex = p1Mapper_.subIndex(entity, i, codim);
+#else
       int localIndex = p1Mapper_.map(entity, i, codim);
+#endif
       return localGlobalMap_.find(localIndex)->second;
     }