Fix headless crash in Light.