partly fixing restart on Windows