Better retry/iterator logic