bugs fixed in writeQdot