* fix flatten error (missing array)
* fix snapshot.exist?