fix unable to restore bug