move saving of settings to the right place