fix deletion from index, add spec