Added missing writer.endArray() into SettingsManager.save().