After Han Huang took over the financial matters, Pei was recalled to Chang'an to resume his duties as Cibu Langzhong and imperial scholar.
[c] Once Pei arrived at Chang'an, however, he did not wait for imperial orders to clarify his responsibilities and directly headed for Jixian Institute to resume his duties there.
As a result, Zheng was demoted to be a prefectural prefect, while Pei was recalled to serve as Zhuzuolang (著作郎), an imperial librarian.
The chancellor Lu Zhi recommended Li Sun (李巽) as Ban's replacement, and Emperor Dezong initially agreed.
Lu submitted a petition severely criticizing Pei for frivolousness and lack of judgment, but Emperor Dezong did not take heed.
[4] As Pei was not himself familiar with financial matters, he summoned experienced administrators at the directorate of finances and asked them for suggestions on how to please the emperor.
[5] It was said that only several officials whose responsibilities were directly related to Pei's — Zhang Pang (張滂) the director of the salt and iron monopolies, Li Chong (李充) the mayor of Jingzhao, and Li Xian (李銛) the minister of agriculture — dared to speak out against him, in addition to Lu, who repeatedly submitted petitions attacking Pei.
However, Emperor Dezong's trust in Pei was not shaken, and instead, he began to be disaffected from Lu, whose opinion he had deeply valued previously.
[2] The Later Jin historian Liu Xu, the lead editor of the Old Book of Tang, commented thus about Pei and another official during the reign of Emperor Xianzong, Huangfu Bo:[3] Evil and wicked people had been harming the righteous ever since ancient times, but for someone who was so careless in his frivolousness and falsehood, as well as his jealousy of the talented and harmfulness to the good, no one could compare to Pei Yanling and Huangfu Bo.