save before setting settings