Made some changes to print_dot.