Fixed saving of settings