diff --git a/unet/segment.py b/unet/segment.py
index d304893b3451d393ff51b583a551f4deb803085e..43fde0059af8cf6df32d89a648548238f09481c3 100644
--- a/unet/segment.py
+++ b/unet/segment.py
@@ -39,10 +39,10 @@ def cell_merge(wsh, pred):
     wshshape=wsh.shape
     
     # masks for the original cells
-    objs = np.zeros((wsh.max()+1,wshshape[0],wshshape[1]))	
+    objs = np.zeros((wsh.max()+1,wshshape[0],wshshape[1]), dtype=bool)	
     
     # masks for dilated cells
-    dil_objs = np.zeros((wsh.max()+1,wshshape[0],wshshape[1]))
+    dil_objs = np.zeros((wsh.max()+1,wshshape[0],wshshape[1]), dtype=bool)
     
     # bounding box coordinates	
     obj_coords = np.zeros((wsh.max()+1,4))