Fix race condition in wipe