Fixed to keep track of LED state.