diff --git a/Numeric/GmshMatrix.cpp b/Numeric/GmshMatrix.cpp
index 96281ed05187d481bd9dc19a40ef503beeac18e1..07a4e792e3d254e7e0021583dcb2a7a3e3bf33fa 100644
--- a/Numeric/GmshMatrix.cpp
+++ b/Numeric/GmshMatrix.cpp
@@ -4,6 +4,7 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <complex>
+#include <string.h>
 #include "GmshConfig.h"
 #include "GmshMatrix.h"
 #include "GmshMessage.h"
@@ -120,11 +121,11 @@ bool gmshMatrix<double>::invertInPlace()
   int *ipiv = new int[N];
   double * invA = new double[N*N];
 
-  for (size_t i=0;i<N*N;i++) invA[i     ] = 0.;
-  for (size_t i=0;i<N;i++)   invA[i*N+i]  = 1.;
+  for (size_t i = 0; i < N * N; i++) invA[i] = 0.;
+  for (size_t i = 0; i < N; i++) invA[i * N + i] = 1.;
 
   dgesv_(&N, &nrhs, _data, &lda, ipiv, invA, &ldb, &info);
-  std::memcpy(_data,invA,N*N*sizeof(double));
+  memcpy(_data, invA, N * N * sizeof(double));
 
   delete [] invA;
   delete [] ipiv;
diff --git a/Numeric/GmshMatrix.h b/Numeric/GmshMatrix.h
index 771f963b792d733a72f9eed50ce216a31dcc8c2f..9e6da0f6ffd66e55f0ac2e3f8e721900706fb042 100644
--- a/Numeric/GmshMatrix.h
+++ b/Numeric/GmshMatrix.h
@@ -78,7 +78,7 @@ class gmshMatrix
   gmshMatrix(const gmshMatrix<scalar> &other) : _r(other._r), _c(other._c)
   {
     _data = new scalar[_r * _c];
-    memcpy(other);
+    gM_memcpy(other);
   }
   gmshMatrix() : _r(0), _c(0), _data(0) {}
   ~gmshMatrix() { if(_data) delete [] _data; }
@@ -90,11 +90,11 @@ class gmshMatrix
       _r = other._r; 
       _c = other._c;
       _data = new scalar[_r * _c];
-      memcpy(other);
+      gM_memcpy(other);
     }
     return *this;
   }
-  void memcpy(const gmshMatrix<scalar> &other)
+  void gM_memcpy(const gmshMatrix<scalar> &other)
   {
     for(int i = 0; i < _r * _c; ++i) _data[i] = other._data[i];
   }
diff --git a/Numeric/gmshLaplace.cpp b/Numeric/gmshLaplace.cpp
index d368962cd50ea1c9b941fc95d155d479507f408e..70caf33e5560628ffc01537ffd0017c877c1a9af 100644
--- a/Numeric/gmshLaplace.cpp
+++ b/Numeric/gmshLaplace.cpp
@@ -41,7 +41,7 @@ void gmshLaplaceTerm::elementMatrix(MElement *e, gmshMatrix<double> &m) const
       for (int k = 0; k <= j; k++){
 	m(j, k) += (Grads[j][0] * Grads[k][0] +
                     Grads[j][1] * Grads[k][1] +
-                    Grads[j][2] * Grads[k][2]) * weight * detJ * _diff * 0.5;
+                    Grads[j][2] * Grads[k][2]) * weight * detJ * _diff;
       }
     }
   }