Updated retry / attempt logic.