diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py
index a63215f09f86df5af679c45c338fedefb754f7ea..8b0a35c98851fb59cfd4059e207d65515949a8b6 100755
--- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py
@@ -212,7 +212,7 @@ Refresh cache:  %s""" % (self.url, self.refreshFlag)
                 row = base64.decodestring(node.data)
                 if self.retrieveZiplevel != "":
                     row = zlib.decompress(row)
-            
+             
                 endFirstRow = row.find('\x07')
                 firstRow = row[:endFirstRow]
                 for c in firstRow:
@@ -239,11 +239,15 @@ Refresh cache:  %s""" % (self.url, self.refreshFlag)
                 row = str(row[endFirstRow+1:])
 
                 row_h = row.rstrip('\x07')
-
+                
                 import re
                 row_h = row_h.replace("\x07\x06",'.nNn.\x06')
 
-                pattern = re.compile("\x06\x00\x00\x00.",flags=re.S)
+#                pattern = re.compile("\x06\x00\x00\x00.",flags=re.S)
+#replace pattern above  more restrictive version, as longerstrings in the results
+#have a size variable in the column separate that becomes visible if the string
+#is large enough - this then broke the prevous  decoding
+                pattern = re.compile("\x06\x00\x00..",flags=re.S)
                 row_h = pattern.sub('.xXx.',row_h)
                 row_h = row_h.replace("\x86", '.xXx.')
 
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcUtils.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcUtils.py
index b1126cb690e7ef4a038efeecf85126f28b09e920..4bf8e2d37a7a6b6b41bc06f76fadb6a01e159006 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcUtils.py
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcUtils.py
@@ -645,6 +645,43 @@ def getChains(connection, smk):
 
     return chainsl2, chainsef
 
+
+def getChainsWithLowerChainNames(connection, smk):
+    cursor,schemaname = getTriggerDBCursor(connection)
+
+    isrun2 = isRun2(cursor,schemaname)
+
+    output = []
+    chainshlt = {}
+
+    if isrun2:
+        output = ['TC.HTC_ID', 'TC.HTC_CHAIN_COUNTER', 'TC.HTC_NAME', 'TC.HTC_LOWER_CHAIN_NAME']
+    else:
+        print "ERROR: This method is compatibly with Run2 only"
+        return chainshlt
+    
+    tables = {}
+    tables['SM']    = 'SUPER_MASTER_TABLE'
+    tables['M2C']   = 'HLT_TM_TO_TC'
+    tables['TC']    = 'HLT_TRIGGER_CHAIN'
+    tables['MT']    = 'HLT_MASTER_TABLE'
+
+    condition = [ "SM.SMT_ID = :smk",
+                  'SM.SMT_HLT_MASTER_TABLE_ID = MT.HMT_ID',
+                  'MT.HMT_TRIGGER_MENU_ID = M2C.HTM2TC_TRIGGER_MENU_ID',
+                  'M2C.HTM2TC_TRIGGER_CHAIN_ID = TC.HTC_ID' ]
+
+    bindvars = { "smk": smk }
+
+    res = executeQuery(cursor, output, condition, schemaname, tables, bindvars)
+
+
+    for x in res:
+        chainshlt[x[1]] = (x[2],x[3])
+
+    return chainshlt
+
+
 def getStreams(connection, smk):
     cursor,schemaname = getTriggerDBCursor(connection)