Merge "Fix return code for ended iteration."