fix checking snapshot and test