Prevent against race condition