diff --git a/www/shib13/idp/SSOService.php b/www/shib13/idp/SSOService.php
index 41ad67436151b0cbc79d32b226e7239b7afffb7d..8c2154f7f5399c044d0fbaad2b80e001ee03bbe3 100644
--- a/www/shib13/idp/SSOService.php
+++ b/www/shib13/idp/SSOService.php
@@ -23,7 +23,7 @@ if (!$config->getValue('enable.shib13-idp', false))
 
 try {
 	$idpentityid = $metadata->getMetaDataCurrentEntityID('shib13-idp-hosted', 'entityid');
-	$idmetaindex = $metadata->getMetaDataCurrentEntityID('shib13-idp-hosted', 'metaindex');
+	$idpmetaindex = $metadata->getMetaDataCurrentEntityID('shib13-idp-hosted', 'metaindex');
 	$idpmetadata = $metadata->getMetaDataCurrent('shib13-idp-hosted');
 } catch (Exception $exception) {
 	SimpleSAML_Utilities::fatalError($session->getTrackID(), 'METADATA', $exception);
@@ -54,6 +54,7 @@ if (isset($_GET['shire'])) {
 			'Issuer'    => $authnrequest->getIssuer(),
 			'shire'		=> $authnrequest->getShire(),
 			'RelayState' => $authnrequest->getRelayState(),
+			'ConsentCookie' => SimpleSAML_Utilities::generateID(),
 		);
 			
 		SimpleSAML_Logger::info('Shib1.3 - IdP.SSOService: Got incomming Shib authnRequest requestid: '.$requestid);