Fixing typo: snaphot -> snapshot

There's a simple typo bug in the initialization of doc, which leads to an error in some of our cases.