Corrected wrong iterator comparison.