fix error in has_parent