issue #39: atomic replace