add more atomicity for versions