Handle race condition