diff --git a/notes/trunk/class/class_modules_tools.php b/notes/trunk/class/class_modules_tools.php
index 0ad0f0f64a23713cd1e1383c451e89ac746f80fd..18e6801192121a1e39525011f082a01319f0784e 100644
--- a/notes/trunk/class/class_modules_tools.php
+++ b/notes/trunk/class/class_modules_tools.php
@@ -20,7 +20,15 @@ class notes
 	*/
 	public function build_modules_tables()
 	{
-		$xmlconfig = simplexml_load_file("modules".DIRECTORY_SEPARATOR."notes".DIRECTORY_SEPARATOR."xml".DIRECTORY_SEPARATOR."config.xml");
+		if(file_exists($_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR."modules".DIRECTORY_SEPARATOR."notes".DIRECTORY_SEPARATOR."xml".DIRECTORY_SEPARATOR."config.xml"))
+		{
+			$path = $_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR."modules".DIRECTORY_SEPARATOR."notes".DIRECTORY_SEPARATOR."xml".DIRECTORY_SEPARATOR."config.xml";
+		}
+		else
+		{
+			$path = "modules".DIRECTORY_SEPARATOR."notes".DIRECTORY_SEPARATOR."xml".DIRECTORY_SEPARATOR."config.xml";
+		}
+		$xmlconfig = simplexml_load_file($path);
 		foreach($xmlconfig->TABLENAME as $TABLENAME)
 		{
 			$_SESSION['tablename']['not_notes'] = (string) $TABLENAME->not_notes;