fix the restore issue