Fix host closing crashes on server.