Fix server.close error