Fixing sgml writer