Fixed bugs in lights on/off.