iterator bug fixed