fix reconnecting issue