diff --git a/wta/bench.py b/wta/bench.py
index 71872bb42bfc35787fb989a7a965c8f8f59b11e1..81d176d26fda74fed4d734cea9b24ad3cebe5f22 100755
--- a/wta/bench.py
+++ b/wta/bench.py
@@ -234,6 +234,7 @@ def find_bad(args, good):
 def bisect_states(args):
     check_zerotrans(args)
 
+    global samples
     samples = 1
 
     states = args.start_states
@@ -292,6 +293,7 @@ def bisect_trans(args):
 
     transitions = args.start_transitions
 
+    global samples
     samples = 1
 
     good = args.good or 0