Fix issue when enabling/disabling a light source