Added reconnect flag if connection is lost