Fixed creation and deletion of indices on a table.