Fixed race condition on windows event loop [win]