more tests, fix bug where indices don't get deleted