attempt to more reliably stop the server during tests, still problematic