Fix infinite retry bug.