minor bug fix to find_attribute, find_element, add an ancestors element