diff --git a/Data/Graph/Libgraph/AlgoDebug.hs b/Data/Graph/Libgraph/AlgoDebug.hs
--- a/Data/Graph/Libgraph/AlgoDebug.hs
+++ b/Data/Graph/Libgraph/AlgoDebug.hs
@@ -16,15 +16,15 @@
 
 
 next_step :: Eq v => Graph v a -> (v -> Judgement) -> v -> v
-next_step tree j v = case j v of
-  Unassessed -> v
-  Right      -> case preds tree v of
-                  []    -> v
-                  (w:_) -> next_step tree j w
-  Wrong      -> case filter (\w -> j w == Unassessed) (succs tree v) of
-                  []    -> v
-                  (w:_) -> w
-
-
+next_step tree j v 
+  | j v == Wrong || v == root tree =
+    case filter (\w -> j w == Unassessed) (succs tree v) of
+                      []    -> v
+                      (w:_) -> w
 
+  | j v == Right =
+    case preds tree v of
+                      []    -> v
+                      (w:_) -> next_step tree j w
 
+  | j v == Unassessed = v
diff --git a/Data/Graph/Libgraph/Dot.hs b/Data/Graph/Libgraph/Dot.hs
--- a/Data/Graph/Libgraph/Dot.hs
+++ b/Data/Graph/Libgraph/Dot.hs
@@ -11,7 +11,7 @@
                           -> (Arc vertex arc->String) -> String
 showWith g vLabel aLabel
   = "diGraph G {\n"
-  ++ vName r ++ "[shape=none label=\".\"]\n"
+  -- ++ vName r ++ "[shape=none label=\".\"]\n"
   ++ foldl (\s v -> show1 v ++ s) "" vs
   ++ foldl (\s a -> (showArc vs aLabel a) ++ s) "" (arcs g)
   ++ "}\n"
@@ -20,7 +20,7 @@
         isRoot (v,_) = v == root g
 
         show1 v
-          | isRoot v  = vName r ++ "[shape=none label=\".\"]\n"
+          -- | isRoot v  = vName r ++ "[shape=none label=\".\"]\n"
           | otherwise = (showVertex vLabel v)
 
 showVertex :: (vertex->(String,String)) -> (vertex,Int) -> String
@@ -39,10 +39,17 @@
 vName i = "v" ++ show i
 
 escape :: String -> String
-escape []          = []
-escape ('"' : ss)  = '\\' : '"'   : escape ss
-escape ('\\' : ss)  = '\\' : '\\' : escape ss
-escape (s   : ss)  = s : escape ss
+escape [] = []
+escape ss = escape' False ss
+
+escape' _ []                          = []
+escape' _ ('"'  : ss)                 = '\\' : '"'  : escape' False ss
+escape' _ ('\\' : ss)                 = '\\' : '\\' : escape' False ss
+escape' w (s    : ss)
+ | w       && (s == ' ' || s == '\n') =               escape' True  ss
+ | (not w) && (s == ' ' || s == '\n') =         ' ' : escape' True  ss
+ | otherwise                          =         s   : escape' False ss
+
 
 -- | Invoke Graphviz and Imagemagick to display graph on screen.
 display :: (Graph vertex arc -> String) -> Graph vertex arc -> IO ()
diff --git a/libgraph.cabal b/libgraph.cabal
--- a/libgraph.cabal
+++ b/libgraph.cabal
@@ -1,5 +1,5 @@
 Name:           libgraph
-Version:        1.6
+Version:        1.7
 Homepage:       http://maartenfaddegon.nl
 Synopsis:       Store and manipulate data in a graph.
 Description:    A graph type, analysis of graphs and manipulation of graphs.
