diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java
index fea1f37..493ff99 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java
@@ -124,7 +124,20 @@
                     final String[] idList = idGetter.getIds( mti );
                     for ( int j = 0; idList != null && j < idList.length; j++ )
                     {
-                        ObjectClassDefinition ocd = mti.getObjectClassDefinition( idList[j], locale );
+                        // After getting the list of PIDs, a configuration  might be 
+                        // removed. So the getObjectClassDefinition will throw
+                        // an exception, and this will prevent ALL configuration from
+                        // being displayed. By catching it, the configurations will be
+                        // visible
+                        ObjectClassDefinition ocd = null;
+                        try 
+                        {
+                            ocd = mti.getObjectClassDefinition( idList[j], locale );
+                        }
+                        catch (IllegalArgumentException ignore)
+                        {
+                            // ignore - just don't show this configuration
+                        }
                         if ( ocd != null )
                         {
                             objectClasses.add( ocd );
@@ -189,7 +202,15 @@
                 MetaTypeInformation mti = mts.getMetaTypeInformation( bundle );
                 if ( mti != null )
                 {
-                    return mti.getObjectClassDefinition( pid, locale );
+                    // see #getObjectClasses( final IdGetter idGetter, final String locale )
+                    try
+                    {
+                        return mti.getObjectClassDefinition( pid, locale );
+                    }
+                    catch (IllegalArgumentException e)
+                    {
+                        // ignore - return null
+                    }
                 }
             }
         }
diff --git a/webconsole/src/main/resources/res/ui/config.js b/webconsole/src/main/resources/res/ui/config.js
index 7e96f45..c282eb8 100644
--- a/webconsole/src/main/resources/res/ui/config.js
+++ b/webconsole/src/main/resources/res/ui/config.js
@@ -426,8 +426,8 @@
 
 function addConfig(conf) {
 	var tr = configRow.clone().appendTo(configBody);
-	tr.find('td:eq(0)').text(conf.fpid ? conf.fpid : '-'); // fpid
-	tr.find('td:eq(1)').text(conf.name).click(function() { // name & edit
+	tr.find('td:eq(1)').text(conf.fpid ? conf.fpid : '-'); // fpid
+	tr.find('td:eq(0)').text(conf.name).click(function() { // name & edit
 		configure(conf.id);
 	});
 	tr.find('td:eq(2)').html(conf.bundle ? '<a href="' + pluginRoot + '/../bundles/' + conf.bundle + '">' + conf.bundle_name + '</a>' : '-'); // binding
@@ -454,8 +454,8 @@
 
 function addFactoryConfig(conf) {
 	var tr = factoryRow.clone().appendTo(factoryBody);
-	tr.find('td:eq(0)').text(conf.id); // fpid
-	tr.find('td:eq(1)').text(conf.name).click(function() { // name & edit
+	tr.find('td:eq(1)').text(conf.id); // fpid
+	tr.find('td:eq(0)').text(conf.name).click(function() { // name & edit
 		configure(conf.id, true);
 	});
 	// buttons
@@ -480,7 +480,7 @@
 	});
 	factoryBody   = factoryTable.find('tbody');
 	factoryRow    = factoryBody.find('tr').clone();
-	
+
 	// setup button - cannot inline in dialog option because of i18n
 	var _buttons = {};
 	_buttons[i18n.abort] = function() {
@@ -511,6 +511,11 @@
 		for(var i in configData.pids) addConfig(configData.pids[i]);
 		for(var i in configData.fpids) addFactoryConfig(configData.fpids[i]);
 		initStaticWidgets(configContent);
+
+		// initial sorting orger by name
+		var sorting = [[0,0]]; 
+		configTable.trigger('sorton', [sorting]);
+		factoryTable.trigger('sorton', [sorting]);
 	} else {
 		configContent.addClass('ui-helper-hidden');
 	}
diff --git a/webconsole/src/main/resources/templates/config.html b/webconsole/src/main/resources/templates/config.html
index 34629c5..4a3d7f1 100644
--- a/webconsole/src/main/resources/templates/config.html
+++ b/webconsole/src/main/resources/templates/config.html
@@ -39,17 +39,17 @@
 	<table class="tablesorter nicetable noauto">
 		<thead>
 			<tr>
-				<th class="col_FPID">Factory PID</th>
 				<th class="col_Name">Name</th>
+				<th class="col_FPID">Factory PID</th>
 				<th class="col_Binding">Bundle</th>
 				<th class="col_Actions" style="width: 7em">Actions</th>
 			</tr>
 		</thead>
 		<tbody>
 			<tr>
-				<td>&nbsp;</td>
 				<td class="pointer">&nbsp;</td>
 				<td>&nbsp;</td>
+				<td>&nbsp;</td>
 				<td>
 					<ul class="icons">
 						<li class="dynhover" title="${config.edit.tip}"><span class="ui-icon ui-icon-pencil">&nbsp;</span></li>
@@ -67,15 +67,15 @@
 	<table class="tablesorter nicetable noauto">
 		<thead>
 			<tr>
-				<th class="col_FPID">Factory PID</th>
 				<th class="col_Name">Name</th>
+				<th class="col_FPID">Factory PID</th>
 				<th class="col_Actions" style="width: 7em">Actions</th>
 			</tr>
 		</thead>
 		<tbody>
 			<tr>
-				<td>&nbsp;</td>
 				<td class="pointer">&nbsp;</td>
+				<td>&nbsp;</td>
 				<td>
 					<ul class="icons">
 						<li class="dynhover" title="${config.create.tip}"><span class="ui-icon ui-icon-plusthick">&nbsp;</span></li>
