diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php
index 504c0ffdb1a226e471646ae9f6583eb419a624b9..127b36d0af24393be4a31c3fc17a5a551ace2e29 100644
--- a/conf/dokuwiki.php
+++ b/conf/dokuwiki.php
@@ -33,8 +33,8 @@ $conf['maxseclevel'] = 3;                 //Up to which level create editable se
 $conf['camelcase']   = 0;                 //Use CamelCase for linking? (I don't like it) 0|1
 $conf['deaccent']    = 1;                 //convert accented chars to unaccented ones in pagenames?
 $conf['useheading']  = 0;                 //use the first heading in a page as its name
-$conf['refcheck']    = 5;                 //check for references before deleting media files
-$conf['refshow']     = 0;                 //show where media files are still in use
+$conf['refcheck']    = 1;                 //check for references before deleting media files
+$conf['refshow']     = 0;                 //how many references should be shown, 5 is a good value
 
 /* Antispam Features */
 
diff --git a/inc/search.php b/inc/search.php
index 8216d98e5a03c984cbacb1edf46311971c924335..d949dc6de664d5b91216883dd3438e843f6be493 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -356,9 +356,10 @@ function search_reference(&$data,$base,$file,$type,$lvl,$opts){
   //only search txt files
   if(!preg_match('#\.txt$#',$file)) return true;
 
-  //we finish after 'n' references found. The return value
+  //we finish after 'cnt' references found. The return value
   //'false' will skip subdirectories to speed search up.
-  if(count($data) >= $conf['refcheck']) return false;
+  $cnt = $conf['refshow'] > 0 ? $conf['refshow'] : 1;
+  if(count($data) >= $cnt) return false;
   
   $reg = '\{\{ *\:?'.$opts['query'].' *(\|.*)?\}\}';
   search_regex($data,$base,$file,$reg,array($opts['query']));