Fix problems of loading settings