In winter 716, Lu died, and Yuan Qianyao became chancellor to serve alongside Yao. Around this time, Yao suffered a bout of malaria, and as he did not have a mansion in Chang'an, stayed at Wangji Temple (罔極寺). While Yao was ill, Emperor Xuanzong often sent eunuchs to look after Yao and had Yuan go to Wangji Temple to consult Yao. It was said that when Yuan made suggestions to Emperor Xuanzong that satisfied Emperor Xuanzong, Emperor Xuanzong would state, "This must be the will of Yao Chong," and that whenever Yuan made suggestions that Emperor Xuanzong was dissatisfied about, Emperor Xuanzong would state, "Go consult with Yao Chong first." Around the new year 717, at Yuan's suggestion, Yao was moved from Wangji Temple to the imperial diplomatic pavilion Sifang Pavilion (四方館), where foreign diplomats would stay when they visited Chang'an, allowing Yao to be closer to the palace—a suggestion that Yao initially declined since he did not believe it appropriate for an ill person to stay there, but which he agreed to at Emperor Xuanzong's insistence.