diff --git a/Mesh/directions3D.h b/Mesh/directions3D.h
index 9fdd2f7a51130686ae35c40c02023233a128df47..95600ab7515c06c28e4477d8876f34d5bbe296a7 100644
--- a/Mesh/directions3D.h
+++ b/Mesh/directions3D.h
@@ -96,4 +96,4 @@ class Nearest_point{
   static void print_segment(SPoint3,SPoint3,std::ofstream&);
   static GRegion* test();
   static void clear();
-};
+};
\ No newline at end of file
diff --git a/Mesh/yamakawa.cpp b/Mesh/yamakawa.cpp
index b0d9c281e04e579fdf089d717fb99a7d2dc89bc3..277584d3509f622da8f95e28648b3eb0a9c71285 100755
--- a/Mesh/yamakawa.cpp
+++ b/Mesh/yamakawa.cpp
@@ -3246,7 +3246,7 @@ void PostOp::pyramids2(MVertex* a,MVertex* b,MVertex* c,MVertex* d,GRegion* gr){
 	estimate1 = estimate1 + tetrahedra.size() + 2*pyramids.size();
 	estimate2 = estimate2 + 1;
 
-	mid = new MVertex(x,y,z);
+	mid = new MVertex(x,y,z,gr);
 	gr->addMeshVertex(mid);
 
 	temp2 = new MPyramid(a,b,c,d,mid);