fixed SSL issue and settings save issue when restoring