--- xmlformat.c.orig	2009-01-18 22:02:17.000000000 +0100
+++ xmlformat.c	2009-03-31 11:56:25.000000000 +0200
@@ -63,6 +63,8 @@ osync_bool copy_xmlformat(const char *in
 		return FALSE;
 	}
 
+	osync_xmlformat_sort(xmlformat);	
+
 	*output = (char *) xmlformat;
 	*outpsize = osync_xmlformat_size();
 
@@ -269,6 +271,8 @@ static time_t get_revision(const char *d
 
 	osync_trace(TRACE_ENTRY, "%s(%p, %i)", __func__, data, size, error);
 
+	osync_xmlformat_sort((OSyncXMLFormat *)data);	
+
 	fieldlist = osync_xmlformat_search_field((OSyncXMLFormat *)data, attribute, error, NULL);
 	if (!fieldlist)
 		goto error;

