Index: /java/installer2/.classpath
===================================================================
--- /java/installer2/.classpath	(revision 736)
+++ /java/installer2/.classpath	(revision 737)
@@ -24,4 +24,5 @@
 	<classpathentry kind="lib" path="/_ThirdPartyLibs/xstream-1.4.3.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/SVNAccess"/>
+	<classpathentry kind="lib" path="/_ThirdPartyLibs/NaturalOrderComparator.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Index: /java/installer2/src/net/oni2/aeinstaller/backend/oni/Installer.java
===================================================================
--- /java/installer2/src/net/oni2/aeinstaller/backend/oni/Installer.java	(revision 736)
+++ /java/installer2/src/net/oni2/aeinstaller/backend/oni/Installer.java	(revision 737)
@@ -37,4 +37,5 @@
 import org.javabuilders.swing.SwingJavaBuilder;
 
+import com.paour.NaturalOrderComparator;
 import com.thoughtworks.xstream.XStream;
 import com.thoughtworks.xstream.io.xml.StaxDriver;
@@ -226,8 +227,8 @@
 						|| s.endsWith(".raw")
 						|| s.endsWith(".sep")
-						|| (s.equals("intro.bik") && !SettingsManager.getInstance()
-								.get("copyintro", false))
-						|| (s.equals("outro.bik") && !SettingsManager.getInstance()
-								.get("copyoutro", false));
+						|| (s.equals("intro.bik") && !SettingsManager
+								.getInstance().get("copyintro", false))
+						|| (s.equals("outro.bik") && !SettingsManager
+								.getInstance().get("copyoutro", false));
 			}
 		})) {
@@ -313,5 +314,5 @@
 		}
 
-		TreeMap<String, Vector<File>> levels = new TreeMap<String, Vector<File>>();
+		TreeMap<String, Vector<File>> levels = new TreeMap<String, Vector<File>>(new NaturalOrderComparator());
 		for (File path : foldersOni) {
 			for (File levelF : path.listFiles()) {
@@ -407,5 +408,6 @@
 			File bslWin = CaseInsensitiveFile.getCaseInsensitiveFile(bsl,
 					"win_only");
-			if (PlatformInformation.getPlatform() == Platform.MACOS && bslMac.exists()) {
+			if (PlatformInformation.getPlatform() == Platform.MACOS
+					&& bslMac.exists()) {
 				for (File f : bslMac.listFiles(dirFileFilter)) {
 					File targetBSL = new File(targetBaseFolder, f.getName());
@@ -477,5 +479,5 @@
 		tmpFolder.mkdir();
 
-		HashMap<String, Vector<File>> patches = new HashMap<String, Vector<File>>();
+		TreeMap<String, Vector<File>> patches = new TreeMap<String, Vector<File>>(new NaturalOrderComparator());
 		for (File patchFolder : patchFolders) {
 			for (File levelFolder : patchFolder.listFiles(dirFileFilter)) {
@@ -509,6 +511,6 @@
 					if (srcFolder.getPath().toLowerCase().contains("vanilla")) {
 						// Extract from .dat
-						ApplicationInvocationResult res = OniSplit.export(levelFolder,
-								srcFolder, exportPatterns);
+						ApplicationInvocationResult res = OniSplit.export(
+								levelFolder, srcFolder, exportPatterns);
 						logAppOutput(res, log);
 					}
@@ -557,6 +559,6 @@
 			Vector<File> files = new Vector<File>();
 			files.add(new File(levelFolder, "*.oni"));
-			ApplicationInvocationResult res = OniSplit.convertOniToXML(levelFolderXML,
-					files);
+			ApplicationInvocationResult res = OniSplit.convertOniToXML(
+					levelFolderXML, files);
 			logAppOutput(res, log);
 
@@ -599,11 +601,6 @@
 		long startMS = new Date().getTime();
 
-		int totalSteps = 0;
+		int totalSteps = oniLevelFolders.size() + 1;
 		int stepsDone = 0;
-
-		for (@SuppressWarnings("unused")
-		String s : oniLevelFolders.keySet())
-			totalSteps++;
-		totalSteps++;
 
 		log.println();
@@ -614,7 +611,7 @@
 					"Installing level " + l);
 
-			ApplicationInvocationResult res = OniSplit.packLevel(oniLevelFolders.get(l),
-					new File(Paths.getEditionGDF(), sanitizeLevelName(l)
-							+ ".dat"));
+			ApplicationInvocationResult res = OniSplit.packLevel(
+					oniLevelFolders.get(l), new File(Paths.getEditionGDF(),
+							sanitizeLevelName(l) + ".dat"));
 			logAppOutput(res, log);
 
@@ -690,6 +687,8 @@
 		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
-		for (@SuppressWarnings("unused")
-		File f : Paths.getVanillaGDF().listFiles(new FilenameFilter() {
+		TreeSet<File> levelFiles = new TreeSet<File>(
+				new NaturalOrderComparator());
+
+		for (File f : Paths.getVanillaGDF().listFiles(new FilenameFilter() {
 			@Override
 			public boolean accept(File dir, String name) {
@@ -698,4 +697,5 @@
 		})) {
 			totalSteps++;
+			levelFiles.add(f);
 		}
 		totalSteps = totalSteps * 2 + 2;
@@ -722,10 +722,5 @@
 			log.println("Exporting levels and moving files to level0");
 
-			for (File f : Paths.getVanillaGDF().listFiles(new FilenameFilter() {
-				@Override
-				public boolean accept(File dir, String name) {
-					return name.endsWith(".dat");
-				}
-			})) {
+			for (File f : levelFiles) {
 				String levelName = f.getName().substring(0,
 						f.getName().indexOf('.'));
@@ -742,5 +737,6 @@
 
 				// Export Vanilla-Level-Dat -> Temp/Level
-				ApplicationInvocationResult res = OniSplit.export(tempLevelFolder, f);
+				ApplicationInvocationResult res = OniSplit.export(
+						tempLevelFolder, f);
 				logAppOutput(res, log);
 
@@ -753,6 +749,10 @@
 
 			log.println("Reimporting levels");
-
+			TreeSet<File> initFolders = new TreeSet<File>(new NaturalOrderComparator());
 			for (File f : init.listFiles()) {
+				initFolders.add(f);
+			}
+
+			for (File f : initFolders) {
 				String levelName = f.getName();
 
@@ -923,5 +923,6 @@
 	}
 
-	private static void logAppOutput(ApplicationInvocationResult result, PrintWriter log) {
+	private static void logAppOutput(ApplicationInvocationResult result,
+			PrintWriter log) {
 		if (result != null) {
 			log.println("\t\t\tCalled:");
