don't delete an item while iterating over the list. related: #51