Fixed deletion

Now removes items in the correct manner.