Added preliminary reconnect logic