fix reconnect server bugs