fix delete_instance script