Fixed apparent race condition on windows machines