diff --git a/MeshLib/Vtk/VtkMappedPropertyVectorTemplate-impl.h b/MeshLib/Vtk/VtkMappedPropertyVectorTemplate-impl.h
index 201e898a8f56b733762a64d46aec33cf70bbe694..39a56743810a83d01e9b79a0caf98b2350aca0d4 100644
--- a/MeshLib/Vtk/VtkMappedPropertyVectorTemplate-impl.h
+++ b/MeshLib/Vtk/VtkMappedPropertyVectorTemplate-impl.h
@@ -436,7 +436,7 @@ template <class Scalar> vtkIdType VtkMappedPropertyVectorTemplate<Scalar>
     return -1;
 }
 
-#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1)
 //------------------------------------------------------------------------------
 template <class Scalar>
 Scalar VtkMappedPropertyVectorTemplate<Scalar>::GetValue(vtkIdType idx) const
diff --git a/MeshLib/Vtk/VtkMappedPropertyVectorTemplate.h b/MeshLib/Vtk/VtkMappedPropertyVectorTemplate.h
index 642b1ee8b1d30a3236b7ed65b70847365368623e..5358222a9a4c31cf722e42dc478d7f961387ec50 100644
--- a/MeshLib/Vtk/VtkMappedPropertyVectorTemplate.h
+++ b/MeshLib/Vtk/VtkMappedPropertyVectorTemplate.h
@@ -20,7 +20,7 @@
 #include <vtkObjectFactory.h>  // for vtkStandardNewMacro
 #include <vtkVersion.h>
 
-#if VTK_MAJOR_VERSION < 7 || VTK_MINOR_VERSION < 1
+#if VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1
 #include <vtkTypeTemplate.h>   // For templated vtkObject API
 #endif
 
@@ -29,7 +29,7 @@
 namespace MeshLib {
 template <class Scalar>
 class VtkMappedPropertyVectorTemplate :
-#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1)
     public vtkMappedDataArray<Scalar>
 #else
     public vtkTypeTemplate<VtkMappedPropertyVectorTemplate<Scalar>,
@@ -37,7 +37,7 @@ class VtkMappedPropertyVectorTemplate :
 #endif // vtk version
 {
 public:
-#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1)
     vtkTemplateTypeMacro(VtkMappedPropertyVectorTemplate<Scalar>,
                          vtkMappedDataArray<Scalar>);
 #else
@@ -100,7 +100,7 @@ public:
     vtkIdType InsertNextValue(Scalar v) override;
     void InsertValue(vtkIdType idx, Scalar v) override;
 
-#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1)
     Scalar GetValue(vtkIdType idx) const override;
     void GetTypedTuple(vtkIdType idx, Scalar* t) const override;
     void SetTypedTuple(vtkIdType i, const Scalar* t) override;
diff --git a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h
index e51182f92fae9f8797e63bd485e2a9039bdbb4b7..b95c8fb201ca1b97691c50f0e449bba40d9c238f 100644
--- a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h
+++ b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h
@@ -398,7 +398,7 @@ template <class Scalar> vtkIdType VtkMeshNodalCoordinatesTemplate<Scalar>
 }
 
 
-#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1)
 template <class Scalar> Scalar& VtkMeshNodalCoordinatesTemplate<Scalar>
 ::GetValueReference(vtkIdType idx) const
 {
diff --git a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h
index 87333375af2e744e917eec01e7f3ce5c4d4728ae..a67311430163553888e1fdb1d57b02d0d31991a6 100644
--- a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h
+++ b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h
@@ -20,7 +20,7 @@
 #include <vtkObjectFactory.h>  // for vtkStandardNewMacro
 #include <vtkVersion.h>
 
-#if VTK_MAJOR_VERSION < 7 || VTK_MINOR_VERSION < 1
+#if VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1
 #include <vtkTypeTemplate.h>   // For templated vtkObject API
 #endif
 
@@ -33,7 +33,7 @@ namespace MeshLib
 {
 template <class Scalar>
 class VtkMeshNodalCoordinatesTemplate :
-#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1)
     public vtkMappedDataArray<Scalar>
 #else
     public vtkTypeTemplate<VtkMeshNodalCoordinatesTemplate<Scalar>,
@@ -41,7 +41,7 @@ class VtkMeshNodalCoordinatesTemplate :
 #endif // vtk version
 {
 public:
-#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1)
     vtkTemplateTypeMacro(VtkMeshNodalCoordinatesTemplate<Scalar>,
                          vtkMappedDataArray<Scalar>);
 #else
@@ -101,7 +101,7 @@ public:
     vtkIdType InsertNextValue(Scalar v) override;
     void InsertValue(vtkIdType idx, Scalar v) override;
 
-#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1)
     Scalar& GetValueReference(vtkIdType idx) const;
     Scalar GetValue(vtkIdType idx) const override;
     void GetTypedTuple(vtkIdType idx, Scalar* t) const override;