clean up conversions and broaden coverage of infinite iteration checks