Change reconnection

Change how reconnection is done.