Yuan's proposals with regard to Tufan, which were abandoned after Yuan's fall from grace in 777. These proposals included rebuilding Yuan Prefecture (原州, in modern Guyuan, Ningxia), at that time in no-man's land between Tang and Tufan, to use as a forward advance position; and restoring Lingyang Canal (陵陽渠, flowing through Bayan Nur, Inner Mongolia), to allow the soldiers stationed in the area to farm. When Emperor Dezong sent a eunuch to Jingyuan to request Duan Xiushi's opinion, Duan opposed on the basis that Tang did not then have adequate number of troops on the border and these acts would provoke a Tufan attack. Yang was displeased, and he had Duan removed from his military governor position and recalled to Chang'an to serve in the relatively unimportant post of minister of agriculture (司農卿, Si'nong Qing). As the way back to Chang'an goes through Fengxiang (鳳翔, in modern Baoji, Shaanxi), which was then under Zhu Ci's command, he cautioned his family members that, when they were also to return to Chang'an, Zhu would surely try to give him a substantial gift and that they should not accept it on his behalf. Once they were at Fengxiang, Zhu did give a substantial amount of silk as a gift; Duan's family members tried to decline, but accepted it after Zhu insisted. Once they arrived at Chang'an, Duan was angered that they received the gift and refused to take the gift inside his mansion; instead, he took the silk to the ministry of agriculture and stored it above the roof support. (After Duan's departure from Jingyuan, his subordinate Liu Wenxi () used his removal as an excuse to occupy Jingyuan and rebel; the other officers then turned against him and killed him.) While serving as minister of agriculture, Duan observed that the imperial guard soldiers were few and weak, and he suggested recruiting more soldiers for the imperial guards; Emperor Dezong ignored his suggestion. In late 783, Jingyuan soldiers, who had been summoned to Chang'an in anticipation of being sent east to battle warlords Zhu Tao (Zhu Ci's brother), Li Na, Wang Wujun, and Tian Yue, who had declared themselves princes, were at Chang'an, when they were angered by the lack of rewards given by Emperor Dezong. On November 2, 783, they rose in mutiny and, with the imperial guard soldiers inadequate to resist them, Emperor Dezong fled to Fengtian. The Jingyuan soldiers supported