diff --git a/Geo/OCCIncludes.h b/Geo/OCCIncludes.h
index e69b011ded4596f72a36fa7cdabb4fdad6d86482..43626856dcacf7c36aa22914e6eda2d015e0cf34 100644
--- a/Geo/OCCIncludes.h
+++ b/Geo/OCCIncludes.h
@@ -108,5 +108,11 @@ using std::iostream;
 #include "BRepAlgoAPI_Cut.hxx"
 #endif
 
+// some Windows versions define min/max macros! 
+#if defined(WIN32)
+#undef min
+#undef max
+#endif
+
 #endif
 
diff --git a/Geo/OCCVertex.cpp b/Geo/OCCVertex.cpp
index f5c142b5be0d6ae40660056251abb037790b15e7..0c880f82f903c5fa058cb3b022fd2498346ca028 100644
--- a/Geo/OCCVertex.cpp
+++ b/Geo/OCCVertex.cpp
@@ -4,11 +4,11 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include "GModel.h"
+#include "MVertex.h"
+#include "MElement.h"
 #include "OCCVertex.h"
 #include "OCCEdge.h"
 #include "OCCFace.h"
-#include "MVertex.h"
-#include "MElement.h"
 
 #if defined(HAVE_OCC)
 
diff --git a/Geo/OCCVertex.h b/Geo/OCCVertex.h
index 4c359b4eba49bc968d357814146035dd41b70cbe..8df227f0dcada2f765a166837dadb8e35a30820b 100644
--- a/Geo/OCCVertex.h
+++ b/Geo/OCCVertex.h
@@ -7,8 +7,8 @@
 #define _OCC_VERTEX_H_
 
 #include "GModel.h"
-#include "OCCIncludes.h"
 #include "GVertex.h"
+#include "OCCIncludes.h"
 
 #if defined(HAVE_OCC)