Fixed spec so the server shuts down properly.