diff --git a/NEWS.txt b/NEWS.txt
index eed12d2bb13d0370e8dc8a421e6b846a7a1bf8d9..a7de360296d14befaf9d64dba821369ca0302ef4 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,9 @@
 Latest changes
 ==============
 
+Python: fix a bug with extract_contour on Windows occurring with some meshes
+and resulting in incorrect contour extraction.
+
 TELEMAC-2D/TELEMAC-3D/TOMAWAC/GAIA: fix time series exports for global models
 
 MASCARET: New keyword VARIABLES PRECISION 
diff --git a/scripts/python3/pretel/extract_contour.py b/scripts/python3/pretel/extract_contour.py
index 67d68553aa058d153c1101ace2f50d871d29d96c..a298cfb32aacf89cef351421bfdf0b5c9230b184 100644
--- a/scripts/python3/pretel/extract_contour.py
+++ b/scripts/python3/pretel/extract_contour.py
@@ -1,6 +1,6 @@
 """ Functions to extract the contour of a mesh """
 
-from collections import defaultdict, OrderedDict
+from collections import OrderedDict, defaultdict
 
 import numpy as np
 from matplotlib.path import Path
@@ -80,9 +80,9 @@ def extract_boundaries(triangles):
             [triangles[:, [0, 1]], triangles[:, [0, 2]], triangles[:, [1, 2]]]
         ),
         axis=1
-    ).astype(int)
+    ).astype(np.int64)
 
-    # Use the Cantor pairing function to creeate edge IDs
+    # Use the Cantor pairing function to create edge IDs
     k1, k2 = edges[:, 0], edges[:, 1]
     edge_ids = (k1 + k2) * (k1 + k2 + 1) // 2 + k2