Fixed crash on stopping a server on windows