diff --git a/lib/config.php b/lib/config.php
index 626dc8b02e36860304e377f4a52846be860c486a..387948c49cfb032aa04621e1956eec8f6896dfb0 100644
--- a/lib/config.php
+++ b/lib/config.php
@@ -133,12 +133,12 @@ class OC_Config{
 		// read all file in config dir ending by config.php
 		$config_files = glob( OC::$SERVERROOT."/config/*.config.php");
 
-		//Sort array naturally :
-		natsort($config_files);
-
 		//Filter only regular files
 		$config_files = array_filter($config_files, 'is_file');
 
+		//Sort array naturally :
+		natsort($config_files);
+
 		// Add default config
 		array_unshift($config_files,OC::$SERVERROOT."/config/config.php");