 Yuchi, however, was able to persuade them that Li Shimin was in fact intending on acting against Li Jiancheng and Li Yuanji, and so Fang and Du put on disguises as Taoist monks and were able to get to Li Shimin's mansions, where they assisted Li Shimin in planning the ambush against Li Jiancheng and Li Yuanji.Li Shimin subsequently ambushed his brothers as Xuanwu Gate and killed them, and then effectively forced Emperor Gaozu to create him crown prince.Once he was created crown prince, Fang and Du were restored to honored positions on his staff, and soon, Fang was made the "Zhongshu Ling" (中書令) — the head of the legislative bureau and a post considered one for a chancellor.