fix saving/loading settings