before destroy removing index