Testing for Windows revealed that restarting was broken, this commit fixes that.