diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp
index 5832b233e4447715757e79a106de84d08d63391d..54676badbeefdb680e41c56c077188a68f31f748 100644
--- a/Geo/Geo.cpp
+++ b/Geo/Geo.cpp
@@ -126,6 +126,7 @@ Vertex *Create_Vertex(int Num, double u, double v, gmshSurface *surf, double lc)
   pV->u = u;
   pV->geometry = surf;
   pV->pntOnGeometry = SPoint2(u,v);
+  surf->is_projection_surface=true;
   return pV;
 }
 
@@ -3069,7 +3070,6 @@ bool SplitCurve(int line_id, List_T *vertices_id, List_T *shapes)
   DeleteShape(c->Typ, c->Num);
   List_Delete(new_list);
   List_Delete(rshapes);
-
   return true;
 }
 
diff --git a/Geo/gmshSurface.h b/Geo/gmshSurface.h
index 6f61d0a949f15f28ce8794322ac31cf882c77aee..34ac7c013ef4af84bd1eda37966598f6b595b4b9 100644
--- a/Geo/gmshSurface.h
+++ b/Geo/gmshSurface.h
@@ -21,12 +21,15 @@ class gmshSurface
 protected:  
   static std::map<int, gmshSurface*> allGmshSurfaces;
 public:
+  bool is_projection_surface;
   virtual ~gmshSurface(){}
   static void reset() 
   {
     std::map<int, gmshSurface*>::iterator it = allGmshSurfaces.begin();
-    for (; it != allGmshSurfaces.end(); ++it)
-      delete it->second;
+    for (; it != allGmshSurfaces.end(); ++it){
+      if(!it->second->is_projection_surface)
+        delete it->second;
+    }
     allGmshSurfaces.clear();
   };
   static gmshSurface* getSurface(int tag);
@@ -78,11 +81,13 @@ public:
   }
 };
 
+#include "stdio.h"
 class gmshPolarSphere : public gmshSurface
 {
   double r;
   SPoint3 o;
-  gmshPolarSphere(double x, double y, double z, double _r) : r(_r), o(x,y,z) {}
+  gmshPolarSphere(double x, double y, double z, double _r) : r(_r), o(x,y,z) {
+  }
 public:
   static gmshSurface *NewPolarSphere(int _iSphere, double _x, double _y, double _z, double _r);
   virtual Range<double> parBounds(int i) const