Fix crash on snapshot change.