the second peace of torun ended the war