diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp
index 1c2ac8f6d047ea034d9abc4186e89ed790a6b54b..bc379f12ff687d87a6198fdefe9468891382e1e4 100644
--- a/Mesh/Field.cpp
+++ b/Mesh/Field.cpp
@@ -1,4 +1,4 @@
-// $Id: Field.cpp,v 1.18 2008-03-18 11:41:08 remacle Exp $
+// $Id: Field.cpp,v 1.19 2008-03-18 14:43:53 remacle Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -192,6 +192,7 @@ class StructuredField : public Field{
 public :
   StructuredField(){
 		options["FileName"]=new FieldOptionString(file_name,&update_needed);
+		data=NULL;
 	}
 	const char *get_name(){
 		return "Structured";
diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp
index f709232732403fd3e19f34ad446c0d3569eea898..a6a7bb299e2b194a005574b4affda6d77dfceb36 100644
--- a/Mesh/meshGEdge.cpp
+++ b/Mesh/meshGEdge.cpp
@@ -1,4 +1,4 @@
-// $Id: meshGEdge.cpp,v 1.55 2008-02-17 08:48:01 geuzaine Exp $
+// $Id: meshGEdge.cpp,v 1.56 2008-03-18 14:43:53 remacle Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -27,6 +27,7 @@
 #include "Message.h"
 #include "List.h"
 #include "Context.h"
+#include "GModel.h"
 
 extern Context_T CTX;
 
@@ -298,7 +299,9 @@ void meshGEdge::operator() (GEdge *ge)
   double t_end = bounds.high();
   
   // first compute the length of the curve by integrating one
-  double length = Integration(ge, t_begin, t_end, F_One, Points, 1.e-8);
+	SPoint3 p1=ge->model()->bounds().min();
+	SPoint3 p2=ge->model()->bounds().max();
+  double length = Integration(ge, t_begin, t_end, F_One, Points, 1.e-8*p1.distance(p2));
   ge->setLength(length);
   // Send a messsage to the GMSH environment
 
diff --git a/demos/gen_earth_100km.geo b/demos/gen_earth_100km.geo
index 874d91010871fb96c409c74c1b81c13c849f8f98..9155c4dd27f7c665c793789caf745573b682476b 100644
--- a/demos/gen_earth_100km.geo
+++ b/demos/gen_earth_100km.geo
@@ -12,25 +12,6 @@ Field[3].LcMax = 300e3;
 Field[3].DistMax = 1000e3;
 Field[3].DistMin = 300e3;
 Field[3].IField = 2;
-Background Field = 3;
-Background Field = 2;
-Background Field = 3;
-Background Field = 1;
-Background Field = 2;
-Background Field = 3;
-Background Field = 2;
-Background Field = 2;
-Background Field = 2;
-Background Field = 2;
-Background Field = 3;
-Background Field = 2;
-Background Field = -1;
-Background Field = 3;
-Background Field = 1;
-Background Field = 2;
-Background Field = 3;
-Background Field = 2;
-Background Field = 1;
-Background Field = 2;
-Background Field = -1;
-Background Field = 3;
+Field[4]=MathEval;
+Field[4].F = "100e3";
+Background Field = 4;