fixed snapshot.js