Fix crash when "shadows" setting is false