fixed the code to extract the snapshots name