Fix rebuildsettings bug

Fix rebuildsettings bug