diff --git a/pycardium/modules/py/simple_menu.py b/pycardium/modules/py/simple_menu.py
index 94cfb63711fbe01db4d42020310b8ca55cc01c28..853950195cc402113b2d242a9ce84d307ad84abe 100644
--- a/pycardium/modules/py/simple_menu.py
+++ b/pycardium/modules/py/simple_menu.py
@@ -90,9 +90,9 @@ def button_events(timeout=None, long_press_ms=LONG_PRESS_MS, retrigger_ms=RETRIG
                     yield buttons.TOP_RIGHT
                 
             if (
-                not still_pressed 
-                and long_press_ms 
-                and time.time_ms() - t0 <= long_press_ms:
+                not still_pressed
+                and long_press_ms
+                and ((time.time_ms() - t0) <= long_press_ms)
             ):
                 pass
             else: