The second issue was World War I. Premier Duan and Liang Qichao was in favor of entering the war on the Allied side. President Li and Sun Yat-sen were opposed. Duan managed to strongarm parliament into breaking ties with the German Empire. Li fired Duan when his secret loans from Japan were revealed. Duan denounced his removal as illegal and set up base in Tianjin. Most of the Beiyang generals sided with Duan and demanded the dissolution of parliament. In June 1917, General Zhang Xun offered to mediate and went to Beijing with his soldiers. Backed with German funds and arms, he occupied the capital and forced Li to dissolve parliament. On July 1, he shocked the country by restoring Puyi as emperor.