Fix the issues in restore snapshot.