Fixed iterator usage.