diff --git a/modules/core/templates/logout-iframe-wrapper.php b/modules/core/templates/logout-iframe-wrapper.php
index 98993786daaa8a91d69f7213f0408a7a1db0a031..4649c289bec589a29413162b8d8491ba194076a5 100644
--- a/modules/core/templates/logout-iframe-wrapper.php
+++ b/modules/core/templates/logout-iframe-wrapper.php
@@ -1,6 +1,6 @@
 <?php
 
-$id = $this->data['id'];
+$id = $this->data['auth_state'];
 $SPs = $this->data['SPs'];
 
 $iframeURL = 'logout-iframe.php?type=embed&id='.urlencode($id);
diff --git a/modules/core/templates/logout-iframe.php b/modules/core/templates/logout-iframe.php
index a89470f0ae0191eaf6cdbcdd2156b0d6df01fb02..de177d08177fd322df0b85ef3c3c35985cadc960 100644
--- a/modules/core/templates/logout-iframe.php
+++ b/modules/core/templates/logout-iframe.php
@@ -1,6 +1,6 @@
 <?php
 
-$id = $this->data['id'];
+$id = $this->data['auth_state'];
 $type = $this->data['type'];
 $from = $this->data['from'];
 $SPs = $this->data['SPs'];
diff --git a/modules/core/www/idp/logout-iframe.php b/modules/core/www/idp/logout-iframe.php
index 68c0f81877df282a06a68b8729248e688932344c..caf00f11db1a154534a9cf8eebf6326da7b78cbe 100644
--- a/modules/core/www/idp/logout-iframe.php
+++ b/modules/core/www/idp/logout-iframe.php
@@ -39,7 +39,7 @@ if ($type !== 'init') { // update association state
             }
         }
 
-        // heck for timeout
+        // check for timeout
         if (isset($sp['core:Logout-IFrame:Timeout']) && $sp['core:Logout-IFrame:Timeout'] < time()) {
             if ($sp['core:Logout-IFrame:State'] === 'inprogress') {
                 $sp['core:Logout-IFrame:State'] = 'failed';
@@ -104,10 +104,12 @@ foreach ($state['core:Logout-IFrame:Associations'] as $association) {
         'entityID' => $association['saml:entityID'],
         'subject' => $association['saml:NameID'],
         'status' => $association['core:Logout-IFrame:State'],
-        'timeout' => $association['core:Logout-IFrame:Timeout'],
         'logoutURL' => $association['core:Logout-IFrame:URL'],
         'metadata' => $mdh->getMetaDataConfig($association['saml:entityID'], $mdset)->toArray(),
     );
+    if (isset($association['core:Logout-IFrame:Timeout'])) {
+        $remaining[$key]['timeout'] = $association['core:Logout-IFrame:Timeout'];
+    }
 }
 
 $id = SimpleSAML_Auth_State::saveState($state, 'core:Logout-IFrame');
@@ -119,6 +121,10 @@ if ($type === 'nojs') {
 }
 
 $t = new SimpleSAML_XHTML_Template($globalConfig, $template_id);
+$t->data['auth_state'] = $id;
+/**
+ * @deprecated The "id" variable will be removed. Please use "auth_state" instead.
+ */
 $t->data['id'] = $id;
 $t->data['type'] = $type;
 $t->data['terminated_service'] = $terminated;