diff --git a/lib/minimizer/css.php b/lib/minimizer/css.php
index 76dc99b335b87303c0b8f1f994146ac9c0c52b1f..5ba557c4cdc3e849c44f062052db7581d65ea7d1 100644
--- a/lib/minimizer/css.php
+++ b/lib/minimizer/css.php
@@ -28,8 +28,8 @@ class OC_Minimizer_CSS extends OC_Minimizer
 				$append = false;
 				foreach( OC::$APPSROOTS as $apps_dir)
 				{
-					if($this->appendIfExist('cssfiles', $apps_dir['path'], $apps_dir['web'], "$style$fext.css", true)) { $append =true; break; }
-					elseif($this->appendIfExist('cssfiles', $apps_dir['path'], $apps_dir['web'], "$style.css", true )) { $append =true; break; }
+					if($this->appendIfExist($apps_dir['path'], $apps_dir['web'], "$style$fext.css", true)) { $append =true; break; }
+					elseif($this->appendIfExist($apps_dir['path'], $apps_dir['web'], "$style.css", true )) { $append =true; break; }
 				}
 				if(! $append) {
 					echo('css file not found: style:'.$script.' formfactor:'.$fext.' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);
diff --git a/lib/minimizer/js.php b/lib/minimizer/js.php
index aea8b66f912beaa2b6a614bcc066ce7526c81eb1..4002b11538f05501eabe153eb7bf8d03dac5f615 100644
--- a/lib/minimizer/js.php
+++ b/lib/minimizer/js.php
@@ -42,8 +42,8 @@ class OC_Minimizer_JS extends OC_Minimizer
 				$append = false;
 				foreach( OC::$APPSROOTS as $apps_dir)
 				{
-					if($page->appendIfExist('jsfiles', $apps_dir['path'], $apps_dir['web'], "$script$fext.js" , true)) { $append =true; break; }
-					elseif($page->appendIfExist('jsfiles', $apps_dir['path'], $apps_dir['web'], "$script.js", true )) { $append =true; break; }
+					if($this->appendIfExist($apps_dir['path'], $apps_dir['web'], "$script$fext.js" , true)) { $append =true; break; }
+					elseif($this->appendIfExist($apps_dir['path'], $apps_dir['web'], "$script.js", true )) { $append =true; break; }
 				}
 				if(! $append) {
 					echo('js file not found: script:'.$script.' formfactor:'.$fext.' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);