fix bug with DTD