#1 invalid iterator handling fixed