diff --git a/Config.py b/Config.py
index b3f3e6cf39a4c698812a81d8c6bb7d4ef52b7c58..9e208f94ec247be77c16630b5d8dce179d37b34b 100644
--- a/Config.py
+++ b/Config.py
@@ -75,11 +75,18 @@ class Config :
     return len(self.lines)
 
   def printForDebug(self, output) :
+    printedCols = ["ID","FORM","UPOS","HEAD","DEPREL"]
+    left = 5
+    right = 5
     print("stack :",[self.getAsFeature(ind, "ID") for ind in self.stack], file=output)
-    for lineIndex in range(len(self.lines)) :
-      print("%s"%("=>" if lineIndex == self.wordIndex else "  "), end="", file=output)
-      toPrint = []
+    toPrint = []
+    for lineIndex in range(self.wordIndex-left, self.wordIndex+right) :
+      if lineIndex not in range(len(self.lines)) :
+        continue
+      toPrint.append(["%s"%("=>" if lineIndex == self.wordIndex else "  ")])
       for colIndex in range(len(self.lines[lineIndex])) :
+        if self.index2col[colIndex] not in printedCols :
+          continue
         value = str(self.getAsFeature(lineIndex, self.index2col[colIndex]))
         if value == "" :
           value = "_"
@@ -87,8 +94,13 @@ class Config :
           value = self.getAsFeature(int(value), "ID")
         elif self.index2col[colIndex] == "HEAD" and value == "-1":
           value = "0"
-        toPrint.append(value)
-      print("\t".join(toPrint), file=output)
+        toPrint[-1].append(value)
+    maxCol = [max([len(toPrint[i][j]) for i in range(len(toPrint))]) for j in range(len(toPrint[0]))]
+    for i in range(len(toPrint)) :
+      for j in range(len(toPrint[i])) :
+        toPrint[i][j] = "{:{}}".format(toPrint[i][j], maxCol[j])
+      toPrint[i] = toPrint[i][0]+" ".join(toPrint[i][1:])
+    print("\n".join(toPrint), file=output)
 
   def print(self, output, header=False) :
     if header :
diff --git a/Decode.py b/Decode.py
index 300572a1a799e50bd5a525d413f1e6a5c3f0a585..1f48a2986fc1faa76ded503801283ba6b486f9c3 100644
--- a/Decode.py
+++ b/Decode.py
@@ -58,14 +58,14 @@ def decodeModel(ts, strat, config, network, dicts, debug) :
     while moved :
       features = extractFeatures(dicts, config).unsqueeze(0).to(decodeDevice)
       output = torch.nn.functional.softmax(network(features), dim=1)
-      candidates = sorted([[ts[index].appliable(config), "%.2f"%float(output[0][index]), ts[index].name] for index in range(len(ts))])[::-1]
-      candidates = [cand[2] for cand in candidates if cand[0]]
+      scores = sorted([["%.2f"%float(output[0][index]), ts[index].appliable(config), ts[index].name] for index in range(len(ts))])[::-1]
+      candidates = [[cand[0],cand[2]] for cand in scores if cand[1]]
       if len(candidates) == 0 :
         break
-      candidate = candidates[0]
+      candidate = candidates[0][1]
       if debug :
         config.printForDebug(sys.stderr)
-        print(str(candidates)+"\n"+("-"*80)+"\n", file=sys.stderr)
+        print(" ".join(["%s%s:%s"%("*" if score[1] else " ", score[0], score[2]) for score in scores])+"\n"+("-"*80)+"\n", file=sys.stderr)
       moved = applyTransition(ts, strat, config, candidate)
 
   EOS.apply(config)