Can't remove item from index

Could you please show us the whole Function?