fix saving config