Added auto-reconnect. Is this clean?