Fix shutting down the http server.