Fixed bug where deleting individual items would sometimes delete the
wrong item.