Reapply race condition fix