Index: /issm/trunk/src/c/objects/Bamg/Mesh.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/Mesh.cpp	(revision 5622)
+++ /issm/trunk/src/c/objects/Bamg/Mesh.cpp	(revision 5623)
@@ -1151,16 +1151,13 @@
 		tt[2]= &triangles[nbt++];
 
-		if (nbt>maxnbt) {
-			ISSMERROR("Not ebough triangles");
-		}
-
-		*tt[1]=   *tt[2]= *t;
-		// gestion of the link
+		if (nbt>maxnbt) ISSMERROR("Not enough triangles");
+
+		*tt[1]=*tt[2]=*t;
 		tt[0]->link=tt[1];
 		tt[1]->link=tt[2]; 
 
-		(* tt[0])(OppositeVertex[0])=&s;
-		(* tt[1])(OppositeVertex[1])=&s;
-		(* tt[2])(OppositeVertex[2])=&s;
+		(*tt[0])(OppositeVertex[0])=&s;
+		(*tt[1])(OppositeVertex[1])=&s;
+		(*tt[2])(OppositeVertex[2])=&s;
 
 		tt[0]->det=det3[0];
@@ -1188,5 +1185,5 @@
 		// swap if the point s is on a edge
 		if(izerodet>=0) {
-			int rswap =tt[izerodet]->swap(iedge);
+			int rswap=tt[izerodet]->swap(iedge);
 
 			if (!rswap) {
Index: /issm/trunk/src/c/solutions/control_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/control_core.cpp	(revision 5622)
+++ /issm/trunk/src/c/solutions/control_core.cpp	(revision 5623)
@@ -102,4 +102,5 @@
 		optargs.n=n; optpars.maxiter=(int)maxiter[n]; optpars.cm_jump=cm_jump[n];
 		BrentSearch(&search_scalar,J+n,&optpars,&objectivefunctionC,&optargs);
+		//OptimalSearch(&search_scalar,J+n,&optpars,&objectivefunctionC,&optargs);
 
 		_printf_("%s\n","      updating parameter using optimized search scalar..."); //true means update parameter and copy it onto ControlParameter input
