lowest common ancestor fix bug