Corrected the logic of parameters for utils in led.py