make Graphviz diagram look a bit nicer, bug fixing