Resolve some math issues on windows