 Following Yuan Lie's death, Emperor Fei himself was angry and wanted to kill Yuwen, despite advise from his cousins Yuan Yu (元育) the Prince of Huaiai and Yuan Zan (元贊) the Prince of Guangping.However, Emperor Fei's apparent attempt to court the imperial guards became known by the commanders, several of whom were Yuwen's sons-in-law, and Yuwen put Emperor Fei under house arrest and then deposed him, replacing him with his younger brother Yuan Kuo the Prince of Qi (as Emperor Gong).Yuwen took this opportunity to change the Han names for the Xianbei that Emperor Xiaowen had instituted back to the original Xianbei names, including changing the imperial surname Yuan back to Tuoba.