diff --git a/phpgwapi/inc/class.portalbox.inc.php b/phpgwapi/inc/class.portalbox.inc.php
index 76976236bb..0dbc00490e 100755
--- a/phpgwapi/inc/class.portalbox.inc.php
+++ b/phpgwapi/inc/class.portalbox.inc.php
@@ -67,6 +67,7 @@
 			{
 				$this->output = array();
 			}
+			$GLOBALS['phpgw']->xslttpl->add_file('portal');
 		}
 
 		/*
@@ -102,11 +103,7 @@
 		{
 			if ($extra && $this->app_name)
 			{
-				$GLOBALS['phpgw']->xslttpl->add_file(array('portal',$GLOBALS['phpgw']->common->get_tpl_dir($this->app_name,'default') . SEP . 'extrabox'));
-			}
-			else
-			{
-				$GLOBALS['phpgw']->xslttpl->add_file('portal');
+				$GLOBALS['phpgw']->xslttpl->add_file($GLOBALS['phpgw']->common->get_tpl_dir($this->app_name,'default') . SEP . 'extrabox');
 			}
 		}
 
@@ -177,22 +174,6 @@
 					'extrabox'		=> $this->extrabox,
 					'xextrabox'		=> $this->xextrabox
 				);
-
-				for ($i=0;$i<count($this->output['portal_data']);$i++)
-				{
-					if ($this->output['portal_data'][$i]['listbox'] == '')
-					{
-						unset($this->output['portal_data'][$i]['listbox']);
-					}
-					if ($this->output['portal_data'][$i]['extrabox'] == '')
-					{
-						unset($this->output['portal_data'][$i]['extrabox']);
-					}
-					if ($this->output['portal_data'][$i]['xextrabox'] == '')
-					{
-						unset($this->output['portal_data'][$i]['xextrabox']);
-					}
-				}
 			}
 		}
 	}
diff --git a/phpgwapi/templates/default/portal.xsl b/phpgwapi/templates/default/portal.xsl
index 37d9e67087..a914375feb 100644
--- a/phpgwapi/templates/default/portal.xsl
+++ b/phpgwapi/templates/default/portal.xsl
@@ -19,7 +19,7 @@
   				<td colspan="2">
 					<table cellpadding="3" cellspacing="0" class="portal">
 						<xsl:choose>
-							<xsl:when test="listbox">
+							<xsl:when test="listbox != ''">
 								<tr>
 									<td>
 										<ul>
@@ -30,14 +30,14 @@
 							</xsl:when>
 						</xsl:choose>
 						<xsl:choose>
-							<xsl:when test="extrabox">
+							<xsl:when test="extrabox != ''">
 								<tr>
 									<td>
 										<xsl:value-of disable-output-escaping="yes" select="extrabox"/>
 									</td>
 								</tr>
 							</xsl:when>
-							<xsl:when test="xextrabox">
+							<xsl:when test="xextrabox != ''">
 								<tr>
 									<td>
 										<xsl:call-template name="extrabox"/>