diff --git a/Plugin/GSHHS.cpp b/Plugin/GSHHS.cpp
index 4a6f76738ebf28df06f031000e9bd3d063aa6794..83033d7aec6da7d2d60cbf570a3c3fef7a27e4cf 100644
--- a/Plugin/GSHHS.cpp
+++ b/Plugin/GSHHS.cpp
@@ -51,7 +51,7 @@ class GMSH_GSHHSPlugin:public GMSH_Post_Plugin
       }
     };
     class reader_gshhs:public reader{
-      /*	$Id: GSHHS.cpp,v 1.22 2009-01-15 00:43:04 geuzaine Exp $
+      /*	$Id: GSHHS.cpp,v 1.23 2009-01-15 13:28:30 remacle Exp $
        *
        * Include file defining structures used in gshhs.c
        *
@@ -337,10 +337,10 @@ class GMSH_GSHHSPlugin:public GMSH_Post_Plugin
         box *b;
         double min_dist;
         loop *l;
-        point(double _x,double _y,double _z,Field *f,double straits_factor){
+        point(double _x,double _y,double _z,Field *f){
           v[0]=_x; v[1]=_y; v[2]=_z;
           if(f)
-            min_dist=(*f)(v[0],v[1],v[2])*straits_factor;
+            min_dist=(*f)(v[0],v[1],v[2]);
         }
         point(double _x,double _y,double _z,double _min_dist){
           v[0]=_x; v[1]=_y; v[2]=_z;
@@ -972,7 +972,7 @@ PView *GMSH_GSHHSPlugin::execute(PView * v)
     while(read->next_point(p)){
       if(c_syst)
         c_syst->to_cartesian(p,p);
-      point newp(p[0],p[1],p[2],field,straits_factor);
+      point newp(p[0],p[1],p[2],field);
       if(newp.min_dist<0){
         while(!l.empty() && l.back().dist(l.front())<l.back().min_dist)
           l.pop_back();
@@ -992,6 +992,9 @@ PView *GMSH_GSHHSPlugin::execute(PView * v)
   }
   delete read;
   if(straits_factor>0 && iField !=0){
+    for(loops::iterator il=ll.begin();il!=ll.end();il++)
+      for(loop::iterator ip=il->begin();ip!=il->end();ip++)
+        ip->min_dist*=straits_factor;
     box *b=new box(point(-radius,-radius,-radius,0.),point(radius,radius,radius,0.));
     for(loops::iterator il=ll.begin();il!=ll.end();il++)
       loop_fill_box(&*il,*b);
diff --git a/Plugin/LongitudeLatitude.cpp b/Plugin/LongitudeLatitude.cpp
index 903d88f0337ce7b6ab657c36d749918b5aee5d3d..a9be619e703858aeb918ded940e5867fabdfa779 100644
--- a/Plugin/LongitudeLatitude.cpp
+++ b/Plugin/LongitudeLatitude.cpp
@@ -4,6 +4,7 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include "LongitudeLatitude.h"
+#include "OpenFile.h"
 
 StringXNumber LongituteLatitudeOptions_Number[] = {
   {GMSH_FULLRC, "iView", NULL, -1.}
@@ -72,22 +73,22 @@ PView *GMSH_LongituteLatitudePlugin::execute(PView *v)
   for(int step = 0; step < data1->getNumTimeSteps(); step++){
     for(int ent = 0; ent < data1->getNumEntities(step); ent++){
       for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){
-	if(data1->skipElement(step, ent, ele)) continue;
+        if(data1->skipElement(step, ent, ele)) continue;
         int nbComp = data1->getNumComponents(step, ent, ele);
         double vin[3], vout[3];
         double xmin = M_PI, xmax = -M_PI;
-	for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++){
-	  double x, y, z;
-	  int tag = data1->getNode(step, ent, ele, nod, x, y, z);
-	  if(!tag){
-	    double x2, y2, z2;
+        for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++){
+          double x, y, z;
+          int tag = data1->getNode(step, ent, ele, nod, x, y, z);
+          if(!tag){
+            double x2, y2, z2;
             z2 = sqrt(x * x + y * y + z * z);
             y2 = asin(z / z2);
             x2 = atan2(y, x);
             xmin=std::min(x2, xmin);
             xmax=std::max(x2, xmax);
-	    data1->setNode(step, ent, ele, nod, x2 * 180 / M_PI, y2 * 180 / M_PI, z2);
-	    data1->tagNode(step, ent, ele, nod, 1);
+            data1->setNode(step, ent, ele, nod, x2 * 180 / M_PI, y2 * 180 / M_PI, 0);
+            data1->tagNode(step, ent, ele, nod, 1);
             if(nbComp == 3){
               for(int i = 0; i < 3; i++)
                 data1->getValue(step, ent, ele, nod, i, vin[i]);
@@ -106,16 +107,17 @@ PView *GMSH_LongituteLatitudePlugin::execute(PView *v)
         if(xmax - xmin > M_PI){ // periodicity check (broken for continuous views)
           for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++){
             double x, y, z;
-	    data1->getNode(step, ent, ele, nod, x, y, z);
+            data1->getNode(step, ent, ele, nod, x, y, z);
             if(xmax * 180 / M_PI - x > 180) x += 360;
-	    data1->setNode(step, ent, ele, nod, x, y, z);
+            data1->setNode(step, ent, ele, nod, x, y, z);
           }
         }
       }
     }
   }
-  
+  data1->destroyAdaptiveData();
   data1->finalize();
+  SetBoundingBox();
   v1->setChanged(true);
   return v1;
 }