fix iterator problem