Fixed bug caused by duplicate iterator name