diff --git a/Source/Core/Data/TEXTURESImage.cs b/Source/Core/Data/TEXTURESImage.cs
index f15845ded673fb2f5ec59daf7bae6011dfb8292b..9d0ed0730edde9881ec44b5864c4f565e9f92e36 100755
--- a/Source/Core/Data/TEXTURESImage.cs
+++ b/Source/Core/Data/TEXTURESImage.cs
@@ -70,8 +70,8 @@ namespace CodeImp.DoomBuilder.Data
 
 			//mxd
 			SetName(name);
-			this.virtualname = (!string.IsNullOrEmpty(virtualpath) ? virtualpath : "[TEXTURES]") + Path.AltDirectorySeparatorChar + this.name;
-			
+			this.virtualname = "[TEXTURES]" + Path.AltDirectorySeparatorChar + (!string.IsNullOrEmpty(virtualpath) ? virtualpath + Path.AltDirectorySeparatorChar : "") + this.name;
+
 			// We have no destructor
 			GC.SuppressFinalize(this);
 		}
diff --git a/Source/Core/Windows/TextureBrowserForm.cs b/Source/Core/Windows/TextureBrowserForm.cs
index 08c7ab5fe3b924429c887e864dac8a8d73d70f02..f4e199271403a9ecd2ed732c85146c483f2a5dd3 100755
--- a/Source/Core/Windows/TextureBrowserForm.cs
+++ b/Source/Core/Windows/TextureBrowserForm.cs
@@ -341,23 +341,27 @@ namespace CodeImp.DoomBuilder.Windows
 		}
 
 		//mxd
-		private void SetItemsCount(TreeNode node) 
+		private int SetItemsCount(TreeNode node) 
 		{
 			ResourceTextureSet ts = ((TreeNodeData)node.Tag).Set as ResourceTextureSet;
 			if(ts == null) throw new Exception("Expected ResourceTextureSet, but got null...");
-			
-			if(node.Parent != null && General.Map.Config.MixTexturesFlats)
+			int texcount = 0;
+
+			foreach (TreeNode child in node.Nodes) texcount += SetItemsCount(child);
+
+			if (node.Parent != null && General.Map.Config.MixTexturesFlats)
 			{
 				ts.MixTexturesAndFlats();
-				if(ts.Textures.Count > 0) node.Text += " [" + ts.Textures.Count + "]";
+				texcount += ts.Textures.Count;
+				if (texcount > 0) node.Text += " [" + texcount + "]";
+				return texcount;
 			} 
 			else
 			{
-				int texcount = (browseflats ? ts.Flats.Count : ts.Textures.Count);
+				texcount = (browseflats ? ts.Flats.Count : ts.Textures.Count);
 				if(texcount > 0) node.Text += " [" + texcount + "]";
+				return texcount;
 			}
-
-			foreach(TreeNode child in node.Nodes) SetItemsCount(child);
 		}
 
 		// Selection changed