diff --git a/Geo/MElementCut.h b/Geo/MElementCut.h
index 9ad260525c8f909f871341acf0f0dcbf03a76a28..24906093992db8bd528843da8e63b797329124f1 100644
--- a/Geo/MElementCut.h
+++ b/Geo/MElementCut.h
@@ -157,7 +157,7 @@ class MPolyhedron : public MElement {
   virtual void writeMSH(FILE *fp, double version=1.0, bool binary=false, 
                         int num=0, int elementary=1, int physical=1);
   virtual int getNumParts() const { return _parts.size(); }
-  virtual MElement *getPart(int i) const { _parts[i]; }
+  virtual MElement *getPart(int i) const { return _parts[i]; }
 };
 
 class MPolygon : public MElement {
@@ -272,7 +272,7 @@ class MPolygon : public MElement {
   virtual void writeMSH(FILE *fp, double version=1.0, bool binary=false, 
                         int num=0, int elementary=1, int physical=1);
   virtual int getNumParts() const { return _parts.size(); }
-  virtual MElement *getPart(int i) const { _parts[i]; }
+  virtual MElement *getPart(int i) const { return _parts[i]; }
 };
 
 class MTriangleBorder : public MTriangle {