Fix LED on and off function