Fixed bugs with removing items.