diff --git a/ChangeLog b/ChangeLog
index 26e22559ee903b29b4beddfdb78326ea9254d830..649a7ceaf252d467236c66b5325b44282fe6a417 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-03-31  Kasper Skårhøj,,,  <kasper@typo3.com>
+
+	* Fixed another small bug in detection of simulateStaticDocuments.
+
 2004-03-31  Kasper Skårhøj,,,  <kasper@typo3.com>
 
 	* Fixed distinction between ' and " in EM.
diff --git a/typo3/sysext/cms/tslib/class.tslib_fe.php b/typo3/sysext/cms/tslib/class.tslib_fe.php
index 1026a65dc0731f7371cff5b9f4d875e1d29940e7..fe48b6210b10123387f1b02bcd29766313b32bde 100755
--- a/typo3/sysext/cms/tslib/class.tslib_fe.php
+++ b/typo3/sysext/cms/tslib/class.tslib_fe.php
@@ -497,9 +497,10 @@
 			// Resolving of "simulateStaticDocuments" URLs:
 		if ($this->siteScript && substr($this->siteScript,0,9)!='index.php')	{		// If there has been a redirect (basically; we arrived here otherwise than via "index.php" in the URL) this can happend either due to a CGI-script or because of reWrite rule. Earlier we used $GLOBALS['HTTP_SERVER_VARS']['REDIRECT_URL'] to check but
 			$uParts = parse_url($this->siteScript);	// Parse the path:
-			$requestFilename = basename($uParts['path']);		// This is the filename of the script/simulated html-file.
-			if (dirname($uParts['path'])=='.' && $requestFilename && substr($requestFilename,-5)=='.html')	{
-				$parts = explode('.',$requestFilename);
+			$fI = t3lib_div::split_fileref($uParts['path']);
+
+			if (!$fI['path'] && $fI['file'] && substr($fI['file'],-5)=='.html')	{
+				$parts = explode('.',$fI['file']);
 				$pCount = count($parts);
 				if ($pCount>2)	{
 					$this->type = intval($parts[$pCount-2]);
diff --git a/typo3/sysext/cms/tslib/class.tslib_pibase.php b/typo3/sysext/cms/tslib/class.tslib_pibase.php
index d0597e71c5f94254c202ea7fc436f4ab2a2be9e3..9ce2b39af404d36dfe8b4d25163b84e787266702 100755
--- a/typo3/sysext/cms/tslib/class.tslib_pibase.php
+++ b/typo3/sysext/cms/tslib/class.tslib_pibase.php
@@ -470,7 +470,7 @@ class tslib_pibase {
 			($showResultCount ? '
 			<p>'.sprintf(
 				str_replace('###SPAN_BEGIN###','<span'.$this->pi_classParam('browsebox-strong').'>',$this->pi_getLL('pi_list_browseresults_displays','Displaying results ###SPAN_BEGIN###%s to %s</span> out of ###SPAN_BEGIN###%s</span>')),
-				$pR1,
+				$this->internal['res_count'] > 0 ? $pR1 : 0,
 				min(array($this->internal['res_count'],$pR2)),
 				$this->internal['res_count']
 				).'</p>':''
@@ -1234,4 +1234,4 @@ class tslib_pibase {
 }
 
 // NO extension of class - does not make sense here.
-?>
\ No newline at end of file
+?>