 Emperor Yang poisoned Yang Yong's oldest son (by Consort Yun), Yang Yan (楊儼) the former Prince of Changning, and exiled Yang Yong's other sons, but eventually had them all killed.It was only after the deaths of Yang Yong's sons that Yuwen was able to recommend Yun to Emperor Yang, who made Yun one of his chief engineers.In 607, while Emperor Yang was conducting a tour of the northern border, he arrived at Yulin Commandery (榆林, roughly modern Yulin, Shaanxi).