adds reconnect on connection loss