Fix reconnect so it works consistently.