Fixed crash when adding an item if we just deleted the lastadded