local & server: fix serv close bug