RNG implementation broken on windows