fix double reconnecting bug