fixed deleting indexes