people at Chang'an. Emperor Xianzong's resolve against Zhangyi did not change, however, and when he came to believe that Wang was responsible for the assassination, he declared a general campaign against Wang as well. He also promoted Pei to be a chancellor. (Later, after investigations by Lü Yuanying () the defender of Luoyang after a plot by Li Shidao's subordinates to riot at Luoyang was foiled, Emperor Xianzong found out that Li Shidao was responsible for Wu Yuanheng's assassination, but by that point, as he was already waging campaigns against Wu Yuanji and Wang, he could not, and did not, declare yet another campaign against Li Shidao as well at that point.) Late reign The imperial forces sent against Zhangyi and Chengde were unsuccessful in quickly achieving final victory against them, however. In 817, with suggestion from the chancellor Li Fengji that he should concentrate on one campaign, Emperor Xianzong called off the campaign against Chengde (although he did not pardon Wang). Meanwhile, Pei Du volunteered to head to the Zhangyi front to oversee the operation, and Emperor Xianzong agreed. Later in the year, Li Su the military governor of Tangsuideng Circuit (唐隨鄧, headquartered in modern Zhumadian) launched a surprise attack against Zhangyi's capital Cai Prefecture (), catching its defenders off guard and capturing it, seizing Wu Yuanji. Wu was subsequently delivered to Chang'an to be executed, and the imperial troops under Pei took over Zhangyi. After Wu Yuanji's execution, Li Shidao and Wang Chengzong both became fearful. In 818, Wang offered to surrender two prefectures to imperial control and send his two sons to Chang'an to serve as hostages. He also sought intercession from Tian Hongzheng. With Tian also requesting that Emperor Xianzong accept his offer, Emperor Xianzong did so, merging the two prefectures that Wang surrendered into neighboring Henghai Circuit (橫海, headquartered in modern Cangzhou, Hebei), which had been obedient to the imperial government. Li Shidao also offered to surrender three of his 12 prefectures to imperial control and send his son as a hostage—but soon reneged on the offer. Emperor Xianzong thus declared a general campaign against his Pinglu Circuit, and soon, the imperial forces were repeatedly dealing defeats to Pinglu troops. Meanwhile, it was said that after the victory over Zhangyi, Emperor Xianzong began to be arrogant and extravagant in his lifestyle, and he favored such officials as Huangfu Bo and Cheng Yi, whom he believed