diff --git a/bob/bio/vein/extractor/RepeatedLineTracking.py b/bob/bio/vein/extractor/RepeatedLineTracking.py
index 5b9d4ab1a2cf8a434b6edd5303f0701aa39e4e9d..ed394babb566b8269a53a6621008e6df04265170 100644
--- a/bob/bio/vein/extractor/RepeatedLineTracking.py
+++ b/bob/bio/vein/extractor/RepeatedLineTracking.py
@@ -111,13 +111,13 @@ class RepeatedLineTracking (Extractor):
             Dud = 1   # Going down
 
         # Initialize locus-positition table Tc
-        Tc = numpy.zeros(finger_image.shape, numpy.bool)
+        Tc = numpy.zeros(finger_image.shape, bool)
 
         #Dlr = -1; Dud=-1; LET OP
         Vl = 1
         while (Vl > 0):
             # Determine the moving candidate point set Nc
-            Nr = numpy.zeros([3,3], numpy.bool)
+            Nr = numpy.zeros([3,3], bool)
             Rnd = numpy.random.random_sample()
             #Rnd = 0.8 LET OP
             if (Rnd < p_lr):
@@ -128,10 +128,10 @@ class RepeatedLineTracking (Extractor):
                 Nr[1+Dud,:] = True
             else:
                 # Going any direction
-                Nr = numpy.ones([3,3], numpy.bool)
+                Nr = numpy.ones([3,3], bool)
                 Nr[1,1] = False
-            #tmp = numpy.argwhere( (~Tc[yc-2:yc+1,xc-2:xc+1] & Nr & finger_mask[yc-2:yc+1,xc-2:xc+1].astype(numpy.bool)).T.reshape(-1) == True )
-            tmp = numpy.argwhere( (~Tc[yc-1:yc+2,xc-1:xc+2] & Nr & finger_mask[yc-1:yc+2,xc-1:xc+2].astype(numpy.bool)).T.reshape(-1) == True )
+            #tmp = numpy.argwhere( (~Tc[yc-2:yc+1,xc-2:xc+1] & Nr & finger_mask[yc-2:yc+1,xc-2:xc+1].astype(bool)).T.reshape(-1) == True )
+            tmp = numpy.argwhere( (~Tc[yc-1:yc+2,xc-1:xc+2] & Nr & finger_mask[yc-1:yc+2,xc-1:xc+2].astype(bool)).T.reshape(-1) == True )
             Nc = numpy.concatenate((xc + filtermask[tmp,0],yc + filtermask[tmp,1]),axis=1)
             if (Nc.size==0):
                 Vl=-1
diff --git a/bob/bio/vein/preprocessor/mask.py b/bob/bio/vein/preprocessor/mask.py
index 45b615df874d0bc9a7da93dca89aa783d4c14456..cf6cb51665fd2dafc630ec8f1cde89d15196061e 100644
--- a/bob/bio/vein/preprocessor/mask.py
+++ b/bob/bio/vein/preprocessor/mask.py
@@ -269,7 +269,7 @@ class KonoMask(Masker):
     y_lo = img_filt_lo.argmin(axis=0)
 
     # Fill region between upper and lower edges
-    finger_mask = numpy.ndarray(image.shape, numpy.bool)
+    finger_mask = numpy.ndarray(image.shape, bool)
     finger_mask[:,:] = False
 
     for i in range(0,img_w):
diff --git a/bob/bio/vein/preprocessor/utils.py b/bob/bio/vein/preprocessor/utils.py
index 723b2458352f35b263e3c4d420fe734245676ac2..ad98846a1125ad00d4d5c8ea3622144ab7f962a2 100644
--- a/bob/bio/vein/preprocessor/utils.py
+++ b/bob/bio/vein/preprocessor/utils.py
@@ -106,7 +106,7 @@ def poly_to_mask(shape, points):
   # draws polygon
   ImageDraw.Draw(mask).polygon(fixed, fill=255)
 
-  return numpy.array(mask, dtype=numpy.bool)
+  return numpy.array(mask, dtype=bool)
 
 
 def mask_to_image(mask, dtype=numpy.uint8):
diff --git a/bob/bio/vein/tests/test.py b/bob/bio/vein/tests/test.py
index ab25fa5470a8fdb10a097c0b67d3a1dd9ac23fe7..199b998cb17f6ba33c3a16458c3cb3b1d54a5c03 100644
--- a/bob/bio/vein/tests/test.py
+++ b/bob/bio/vein/tests/test.py
@@ -411,7 +411,7 @@ def test_poly_to_mask():
   area = (10, 9) #10 rows, 9 columns
   polygon = [(2, 2), (2, 7), (7, 7), (7, 2)] #square shape, (y, x) format
   mask = preprocessor_utils.poly_to_mask(area, polygon)
-  nose.tools.eq_(mask.dtype, numpy.bool)
+  nose.tools.eq_(mask.dtype, bool)
 
   # This should be the output:
   expected = numpy.array([
@@ -430,7 +430,7 @@ def test_poly_to_mask():
 
   polygon = [(3, 2), (5, 7), (8, 7), (7, 3)] #trapezoid, (y, x) format
   mask = preprocessor_utils.poly_to_mask(area, polygon)
-  nose.tools.eq_(mask.dtype, numpy.bool)
+  nose.tools.eq_(mask.dtype, bool)
 
   # This should be the output:
   expected = numpy.array([
@@ -453,7 +453,7 @@ def test_mask_to_image():
   # Tests we can correctly convert a boolean array into an image
   # that makes sense according to the data types
   sample = numpy.array([False, True])
-  nose.tools.eq_(sample.dtype, numpy.bool)
+  nose.tools.eq_(sample.dtype, bool)
 
   def _check_uint(n):
     conv = preprocessor_utils.mask_to_image(sample, 'uint%d' % n)