fixed bug that kept LED on