diff --git a/apps/files_texteditor/appinfo/app.php b/apps/files_texteditor/appinfo/app.php
index 6c10fe44704c8839dbc229c1d31b4e1aa9da36f1..15d79933a17f3da84c28507500948edbc204f32e 100644
--- a/apps/files_texteditor/appinfo/app.php
+++ b/apps/files_texteditor/appinfo/app.php
@@ -1,4 +1,6 @@
 <?php
-//load the required js file
-OC_UTIL::addScript('files_texteditor','editor');
+//load the required files
+OC_Util::addStyle( 'files_texteditor', 'style' );
+OC_Util::addScript( 'files_texteditor', 'editor');
+OC_Util::addScript( 'files_texteditor', 'aceeditor/ace');
 ?>
diff --git a/files/index.php b/files/index.php
index 67324d4df2c039c776c4a9644fbced88c97b46cc..aa081d4880432433a2f1723b3fe5117e0380c16e 100644
--- a/files/index.php
+++ b/files/index.php
@@ -30,12 +30,9 @@ OC_Util::checkLoggedIn();
 
 // Load the files we need
 OC_Util::addStyle( "files", "files" );
-OC_Util::addStyle( 'files_texteditor', 'style' );
 OC_Util::addScript( "files", "files" );
 OC_Util::addScript( 'files', 'filelist' );
 OC_Util::addScript( 'files', 'fileactions' );
-OC_Util::addScript( 'files_texteditor', 'editor');
-OC_Util::addScript( 'files_texteditor', 'aceeditor/ace');
 if(!isset($_SESSION['timezone'])){
 	OC_Util::addScript( 'files', 'timezone' );
 }