diff --git a/www/shib13/idp/SSOService.php b/www/shib13/idp/SSOService.php
index dcdcc1b38a4e415d5819b428ef79e283052a6bec..f991cd178ee3fe22e4ba12a696594db6b12ef298 100644
--- a/www/shib13/idp/SSOService.php
+++ b/www/shib13/idp/SSOService.php
@@ -137,7 +137,8 @@ if (!$session->isAuthenticated($authority) ) {
 		/*
 		 * Attribute handling
 		 */
-		$afilter = new SimpleSAML_XML_AttributeFilter($config, $session->getAttributes());
+		$attributes = $session->getAttributes();
+		$afilter = new SimpleSAML_XML_AttributeFilter($config, $attributes);
 		$afilter->process($idpmetadata, $spmetadata);
 
 		/**