 It was said that he impressed the people of Liang Prefecture with his dignity and grace, and was able to fend off attacks from Eastern Tujue.Subsequently, he was recalled to Chang'an to serve as "Dianzhong Jian" (殿中監), the head of the palace affairs bureau (殿中省) – a high-level post, but one not bestowed with great powers.Later, on account of illness, he was made the prefect of Pu Prefecture (蒲州, roughly modern Yuncheng, Shanxi), but was then recalled back to Chang'an to be a minor general.