Better shutdown on windows