the children. In 613, it was by his decision that young Lady Zhangsun, then 12, married Li Shimin, the 14-year-old son of the general Li Yuan the Duke of Tang, as he was impressed by Li Shimin. In 614, during the second campaign against Goguryeo by Emperor Wen's son Emperor Yang, the general Yang Xuangan rebelled, and one of Yang Xuangan's associates, the minister of defense Husi Zheng (斛斯政), fled to Goguryeo. As Gao was friendly with Husi, he was demoted and exiled to being the secretary general of Zhuyuan County (朱鳶, in modern northern Vietnam). As he did not want to subject his parents to the distant travel into the remote region, he left his wife Lady Xianyu to stay with his parents and went by himself. Further, in order to allow his sister to continue be able to live without him around, he sold his mansion and bought a smaller house, and then divided the remaining proceeds with his sister before departing for Zhuyuan. In 617, with almost the entire Sui territory engulfed in agrarian rebellions against Emperor Yang's rule, Xiao Xi, a descendant of Liang Dynasty's imperial line, rose as well, declaring a restoration of Liang, and soon seized the modern Hubei and Hunan region and was seeking to expand. In spring 618, Xiao sent his general Ning Changzhen (寧長真) south. At that time, Gao had become the legal assistant to Qiu He (丘和) the governor of Jiaozhi Commandery (交趾, modern northern Vietnam). Qiu had previously rejected overtures by both Xiao and another rebel ruler, Lin Shihong the Emperor of Chu, but in light of Ning's attack was considering submitting to Xiao. Gao advised against it, arguing that Ning's forces had marched a long distance and would be fatigued, and Qiu agreed, engaging and defeating Ning. However, when news came that Emperor Yang had been killed in a coup at Jiangdu (江都, in modern Yangzhou, Jiangsu) led by the general Yuwen Huaji, Qiu submitted to Xiao. During Emperor Gaozu's reign Li Yuan, who established Tang Dynasty at Chang'an in 618, sent his nephew Li Xiaogong the Prince of Zhao Commandery and Li Jing to attack Liang in 621. Li Xiaogong and Li Jing were successful in capturing Xiao Xi's capital Jiangling (江陵, in modern Jingzhou, Hubei) and forcing him to surrender. Thereafter, most of Liang territory submitted to Tang, and in spring 622, Qiu He sent Gao