bugfix in writeDot()