Fix material loading. Fix light on/off status bug.