Fix light logic