fixed bug in find_all_ancestors