Bugfixes to DOT printing