Fixed iterator issues.