Index: AE/Installer/trunk/source/installer.cpp
===================================================================
--- AE/Installer/trunk/source/installer.cpp	(revision 504)
+++ AE/Installer/trunk/source/installer.cpp	(revision 505)
@@ -350,5 +350,5 @@
 			if (!file.fail())
 			{
-				package = fileToModPackage(file);
+				package = fileToModPackage(file, dir_itr->path().filename());
 				if (package.installerVersion.compare(INSTALLER_VERSION) < 1)  // if mod requires newer version of the Installer, we won't add it to the list
 				{
@@ -374,5 +374,5 @@
 }
 
-ModPackage fileToModPackage(fstream &file)
+ModPackage fileToModPackage(fstream &file, string modName)
 {
 	/*
@@ -384,20 +384,23 @@
 	 slower than reading a variable.
 	 */
+	
 	ModPackage package;
 	string line;
-	static string AEInstallVersion = "AEInstallVersion"; // used for comparing to the current token...
-	static string NameOfMod = "NameOfMod";
-	static string ARROW = "->";
-	static string ModString = "ModString";
-	static string Platform = "Platform";
-	static string HasOnis = "HasOnis";
-	static string HasDeltas = "HasDeltas";
-	static string HasBSL = "HasBSL";
-	static string HasDats = "HasDats";
-	static string IsEngine = "IsEngine";
-	static string Readme = "Readme";
-	static string GlobalNeeded = "GlobalNeeded";
-	static string Category = "Category";
-	static string Creator = "Creator";
+	const string AEInstallVersion = "AEInstallVersion"; // used for comparing to the current token...
+	const string NameOfMod = "NameOfMod";
+	const string ARROW = "->";
+	const string ModString = "ModString";
+	const string ModVersion = "ModVersion";
+	const string Platform = "Platform";
+	const string HasOnis = "HasOnis";
+	const string HasDeltas = "HasDeltas";
+	const string HasBSL = "HasBSL";
+	const string HasDats = "HasDats";
+	const string IsEngine = "IsEngine";
+	const string Readme = "Readme";
+	const string GlobalNeeded = "GlobalNeeded";
+	const string Category = "Category";
+	const string Creator = "Creator";
+	package.modStringName =	modName;
 	while (!file.eof())
 	{
@@ -426,6 +429,11 @@
 			{
 				iter++; iter++;
-				package.modStringName = *iter;
+				//package.modStringName = *iter;
 				iter++;
+				package.modStringVersion = atof((*iter).c_str());
+			}
+			else if (!ModString.compare(*iter))
+			{
+				iter++; iter++;
 				package.modStringVersion = atof((*iter).c_str());
 			}
@@ -443,5 +451,5 @@
 			{
 				iter++; iter++;
-				if (toupper((*iter)[0]) == 'Y' && toupper((*iter)[1]) == 'E' && toupper((*iter)[2]) == 'S') package.hasBSL = true;
+				if (boost::iequals(*iter, "Yes")) package.hasBSL = true;
 				else if (boost::iequals(*iter, "Addon")) package.hasAddon = true;
 			}
@@ -976,5 +984,5 @@
 			if (!file.fail())
 			{
-				ModPackage updatePackage = fileToModPackage(file);
+				ModPackage updatePackage = fileToModPackage(file, install_iter->path().filename());
 			}
 			else 
@@ -988,5 +996,5 @@
 			if (!file.fail())
 			{
-				ModPackage installedPackage = fileToModPackage(file);
+				ModPackage installedPackage = fileToModPackage(file, install_iter->path().filename());
 			}
 			else
@@ -1270,22 +1278,22 @@
 	try{
 		directory_iterator end;
-		for ( directory_iterator install_iter( pathToUpdate );
-			install_iter != end;
-			++install_iter )
+		for ( directory_iterator update_iter( pathToUpdate );
+			update_iter != end;
+			++update_iter )
 		{
 
 			ModPackage installedPackage, updatePackage;
-			string updateStr = install_iter->path().string() + "/Mod_Info.cfg";
-			if ( !boost::iequals(install_iter->path().filename(),"Edition")
-				&& !boost::iequals(install_iter->path().filename(),"Edition-patch")
-				&& is_directory( install_iter->path() ) 
-				&& exists( install_iter->path().string() + "/Mod_Info.cfg" ) ) 
+			string updateStr = update_iter->path().string() + "/Mod_Info.cfg";
+			if ( !boost::iequals(update_iter->path().filename(),"Edition")
+				&& !boost::iequals(update_iter->path().filename(),"Edition-patch")
+				&& is_directory( update_iter->path() ) 
+				&& exists( update_iter->path().string() + "/Mod_Info.cfg" ) ) 
 			{
 				bool update = 0;
 				fstream file;
-				file.open( (install_iter->path().string() + "/Mod_Info.cfg").c_str());	
+				file.open( (update_iter->path().string() + "/Mod_Info.cfg").c_str());	
 				if (!file.fail())
 				{
-					updatePackage = fileToModPackage(file);
+					updatePackage = fileToModPackage(file, update_iter->path().filename());
 				}
 				else 
@@ -1294,11 +1302,11 @@
 					continue;
 				}
-				if(!exists(strPathToPackages + "/" + install_iter->path().filename() + "/Mod_Info.cfg"));
+				if(!exists(strPathToPackages + "/" + update_iter->path().filename() + "/Mod_Info.cfg"));
 				file.close();
 				file.clear();
-				file.open((strPathToPackages + "/" + install_iter->path().filename() + "/Mod_Info.cfg").c_str());
+				file.open((strPathToPackages + "/" + update_iter->path().filename() + "/Mod_Info.cfg").c_str());
 				if (!file.fail())
 				{
-					installedPackage = fileToModPackage(file);
+					installedPackage = fileToModPackage(file, update_iter->path().filename());
 					file.close();
 					if(updatePackage.modStringVersion > installedPackage.modStringVersion) {
Index: AE/Installer/trunk/source/installer.h
===================================================================
--- AE/Installer/trunk/source/installer.h	(revision 504)
+++ AE/Installer/trunk/source/installer.h	(revision 505)
@@ -53,5 +53,5 @@
 int listInstalledPackages(void);
 int printInstallerInfo(void);
-ModPackage fileToModPackage(fstream&);
+ModPackage fileToModPackage(fstream&, string);
 bool StringIsLegalPathForDeletion(string);
 vector<ModPackage> getPackages(string packageDir = "./packages");
