Fix saving of light settings to preferences