Remove race condition