fix initialization of snapshot