Fix bug in classic issue: delete item when iterating