Fix the wrong variable operating and the feature of unsaved setting