Optimistic locking improvements