Fixed crash when adding an item if we jsut deleted the lastadded (lastAdded is invalid)