FIXED: Fix the iteration terminator check.