* fixed potential invalid iterator usage