fixed snapshot bug