fix get_parent definition