Fixing destruction of doctypedecl