fix bug saveSettings shared ptr