fixed bug for jpg generation from dot