Index: /trunk/psModules/src/concepts/pmConceptsStandard.c
===================================================================
--- /trunk/psModules/src/concepts/pmConceptsStandard.c	(revision 13861)
+++ /trunk/psModules/src/concepts/pmConceptsStandard.c	(revision 13862)
@@ -74,39 +74,6 @@
     }
 
-    const char *key = concept->data.str;        // The name to look up
-    psString value = psMetadataLookupStr(&mdok, filters, key); // Value to use
-    if (!mdok || !value || strlen(value) == 0) {
-        psError(PS_ERR_UNEXPECTED_NULL, true,
-                "Unable to find %s in FILTER.ID in camera configuration.\n", key);
-        return NULL;
-    }
-
-    return psMetadataItemAllocStr(pattern->name, pattern->comment, value);
-}
-
-psMetadataItem *p_pmConceptFormat_FPA_FILTER(const psMetadataItem *concept,
-					     pmConceptSource source,
-					     const psMetadata *cameraFormat,
-					     const pmFPA *fpa,
-					     const pmChip *chip,
-					     const pmCell *cell)
-{
-    assert(concept);
-    assert(fpa);
-    assert(fpa->camera);
-
-    if (concept->type != PS_DATA_STRING) {
-        psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Type for %s (%x) is not STR\n",
-                concept->name, concept->type);
-        return NULL;
-    }
-
-    bool mdok;                          // Status of MD lookup
-    psMetadata *filters = psMetadataLookupMetadata(&mdok, fpa->camera, "FILTER.ID");
-    if (!mdok || !filters) {
-        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find FILTER.ID in camera configuration.\n");
-        return NULL;
-    }
-
+    // the metadata is in the format (internal) STR (external)
+    // do a reverse lookup to get the internal name
     psMetadataIterator *iter = psMetadataIteratorAlloc(filters, PS_LIST_HEAD, NULL); // Iterator for filters
     psMetadataItem *item;               // Item from iteration
@@ -131,7 +98,44 @@
     }
 
-    return psMetadataItemAllocStr(concept->name, concept->comment, name);
-}
-
+    return psMetadataItemAllocStr(pattern->name, pattern->comment, name);
+}
+
+psMetadataItem *p_pmConceptFormat_FPA_FILTER(const psMetadataItem *concept,
+					     pmConceptSource source,
+					     const psMetadata *cameraFormat,
+					     const pmFPA *fpa,
+					     const pmChip *chip,
+					     const pmCell *cell)
+{
+    assert(concept);
+    assert(fpa);
+    assert(fpa->camera);
+
+    if (concept->type != PS_DATA_STRING) {
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Type for %s (%x) is not STR\n",
+                concept->name, concept->type);
+        return NULL;
+    }
+
+    bool mdok;                          // Status of MD lookup
+    psMetadata *filters = psMetadataLookupMetadata(&mdok, fpa->camera, "FILTER.ID");
+    if (!mdok || !filters) {
+        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find FILTER.ID in camera configuration.\n");
+        return NULL;
+    }
+
+    const char *key = concept->data.str;        // The name to look up
+    
+    // the metadata is in the format (internal) STR (external)
+    // find the first internal name that matches
+    psString value = psMetadataLookupStr(&mdok, filters, key); // Value to use
+    if (!mdok || !value || strlen(value) == 0) {
+        psError(PS_ERR_UNEXPECTED_NULL, true,
+                "Unable to find %s in FILTER.ID in camera configuration.\n", key);
+        return NULL;
+    }
+
+    return psMetadataItemAllocStr(concept->name, concept->comment, value);
+}
 
 // FPA.RA and FPA.DEC
