Fixed snapshot bug