Fix potential invalid iterator bug