fixed the light setting performance problem