bug fix iterator