diff --git a/ChangeLog b/ChangeLog
index c709b0ad3f0343e73db97f3d34cc14ce0dae01da_Q2hhbmdlTG9n..49e1a2a97c19d801bc09dc4a731bf19a4cc211d2_Q2hhbmdlTG9n 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Mar 22 20:25:41 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+	* libxslt/xsltconfig.h.in: small fix for OpenVMS
+	* libxslt/documents.c: fixed a leak associated to the change
+	  in reference counting when running the XML parser and using
+	  the document() function.
+
 Wed Mar 17 18:49:55 HKT 2004 William Brack <wbrack@mmm.com.hk>
 
 	* xsltproc/xsltproc.c: added check for state XSLT_STATE_STOPPED
diff --git a/libxslt/documents.c b/libxslt/documents.c
index c709b0ad3f0343e73db97f3d34cc14ce0dae01da_bGlieHNsdC9kb2N1bWVudHMuYw==..49e1a2a97c19d801bc09dc4a731bf19a4cc211d2_bGlieHNsdC9kb2N1bWVudHMuYw== 100644
--- a/libxslt/documents.c
+++ b/libxslt/documents.c
@@ -194,7 +194,6 @@
 
     if (pctxt->wellFormed) {
         doc = pctxt->myDoc;
-	xmlDictReference(pctxt->dict);
     }
     else {
         doc = NULL;
diff --git a/libxslt/xsltconfig.h.in b/libxslt/xsltconfig.h.in
index c709b0ad3f0343e73db97f3d34cc14ce0dae01da_bGlieHNsdC94c2x0Y29uZmlnLmguaW4=..49e1a2a97c19d801bc09dc4a731bf19a4cc211d2_bGlieHNsdC94c2x0Y29uZmlnLmguaW4= 100644
--- a/libxslt/xsltconfig.h.in
+++ b/libxslt/xsltconfig.h.in
@@ -79,6 +79,8 @@
 #define XSLT_NEED_TRIO
 #endif
 #ifdef __VMS
+#define HAVE_MATH_H 1
+#define HAVE_SYS_STAT_H 1
 #ifndef XSLT_NEED_TRIO
 #define XSLT_NEED_TRIO
 #endif