Fixing snapshot script