fix deadlock

calling w.Values() inside Snapshot was causing a stuck lock
also make the companion code a bit more consistent