In the 20th year of Emperor Kaihuang's reign in the Sui Dynasty, Emperor Wen deposed the crown prince Yang Yong and appointed the second prince Yang Guang as the crown prince, who would be the future Emperor Yang.
Hence the chaos at the end of the Sui Dynasty and the beginning of the Tang Dynasty...