fix server reconnect bug