Huangfu and executed Wang. By this point, Yang Yong the Crown Prince had lost the favor of both Emperor Wen and Empress Dugu, over his being overly wasteful (which displeased Emperor Wen) and having many concubines (which displeased Empress Dugu). They therefore considered deposing him and replacing him with Yang Guang. When Empress Dugu hinted as such, Gao Jiong stated clear opposition. Meanwhile, Emperor Wen himself had engaged in sexual relations with Yuchi Jiong's granddaughter, who had been made a servant after her grandfather's defeat—and when Empress Dugu found out, she had Yuchi Jiong's granddaughter killed. Emperor Wen was exceedingly angry and rode away from the palace on a horse, returning to the palace only at the urging of Gao and Yang Su—but with Gao further angering Empress Dugu when Gao referred to her as "a woman." In 599, Gao was accused of associating with Wang Shiji and removed from his posts. Subsequently, Gao was accused of cursing Emperor Wen, but when the sentence of death was recommended, Emperor Wen commented that he could not kill Gao soon after killing Yu and Wang, and therefore only reduced Gao to commoner rank. In winter 599, Emperor Wen created Ashina Rangan Qimin Khan, and commissioned Zhangsun Sheng to build the city of Dali (大利, in modern Hohhot) to house Ashian Rangan's people, and also sent an army to protect Ashina Rangan. By now, the Princess Anyi had died, and Emperor Wen married another daughter of a clansman, whom he created the Princess Yicheng (), to marry Ashina Rangan. Soon thereafter, Ashina Yongyulü was assassinated, and Ashina Dianjue declared himself Bujia Khan. In summer 600, Ashina Dianjue attacked Ashina Rangan, and Sui forces fought off Ashina Dianjue's attack, further causing Ashina Rangan to be grateful to Sui. In fall 600, with Yang Guang and Yang Su forming a faction, with tacit support of Empress Dugu, they had Yang Yong's associate Ji Wei () falsely accuse Yang Yong of plotting treason. Emperor Wen deposed Yang Yong and replaced him with Yang Guang. Emperor Wen also put a number of officials whom he believed to be part of Yang Yong's faction, including Shi and Yuan Min () the Duke of Wuyuan, to death. Renshou era In 602, Empress Dugu died, and Emperor Wen was greatly saddened. Thereafter, he began to engage in sexual relations with his concubines, favoring Consort Chen and Consort Cai. Also in