fixing race condition build errors on windows, thanks to @dazKind