diff --git a/cpdctrl/measurement.py b/cpdctrl/measurement.py
index 2c7791f..a240201 100644
--- a/cpdctrl/measurement.py
+++ b/cpdctrl/measurement.py
@@ -94,7 +94,8 @@ def measure(
     if flush_after == 0: flush_after = None
     try:
         i = 0
-        led_val = led_script.start()
+        led_val = None
+        led_script.start()
         t_iter_start = time.time()
         while True:
             # using while True and if, to be able to log the stop reason