Index: uspace/srv/fs/exfat/exfat_directory.c
===================================================================
--- uspace/srv/fs/exfat/exfat_directory.c	(revision 602c3d8c0197058b083f35943efa51b1ecc9e46f)
+++ uspace/srv/fs/exfat/exfat_directory.c	(revision c56c45760d4350fae5a2a6a8f6cf12ce8cb4ba62)
@@ -283,5 +283,5 @@
 		if (rc != EOK)
 			return rc;
-		memcpy((uint8_t *)&array[i], (uint8_t *)de, sizeof(exfat_dentry_t));
+		array[i] = *de;
 		rc = exfat_directory_next(di);
 		if (rc!=EOK) {
@@ -297,9 +297,9 @@
 
 	/* Sync */
-	array[0].file.attr = df->attr;
-	array[1].stream.firstc = ds->firstc;
+	array[0].file.attr = host2uint16_t_le(df->attr);
+	array[1].stream.firstc = host2uint32_t_le(ds->firstc);
 	array[1].stream.flags = ds->flags;
-	array[1].stream.valid_data_size = ds->valid_data_size;
-	array[1].stream.data_size = ds->data_size;
+	array[1].stream.valid_data_size = host2uint64_t_le(ds->valid_data_size);
+	array[1].stream.data_size = host2uint64_t_le(ds->data_size);
 	array[0].file.checksum = host2uint16_t_le(exfat_directory_set_checksum((uint8_t *)array,
 	    count*sizeof(exfat_dentry_t)));
@@ -310,5 +310,5 @@
 		if (rc != EOK)
 			return rc;
-		memcpy((uint8_t *)de, (uint8_t *)&array[i], sizeof(exfat_dentry_t));
+		*de = array[i];
 		di->b->dirty = true;
 		rc = exfat_directory_next(di);
@@ -318,4 +318,5 @@
 		}
 	}
+	free(array);
 
 	return EOK;
@@ -369,5 +370,5 @@
 	uint16_t wname[EXFAT_FILENAME_LEN+1];
 	int rc, i;
-	size_t uctable_chars;
+	size_t uctable_chars, j;
 	aoff64_t pos;
 
@@ -420,5 +421,5 @@
 	if (rc != EOK)
 		return rc;
-	memcpy(de, &df, sizeof(exfat_dentry_t));
+	*de = df;
 	di->b->dirty = true;
 	rc = exfat_directory_next(di);
@@ -430,5 +431,5 @@
 	if (rc != EOK)
 		return rc;
-	memcpy(de, &ds, sizeof(exfat_dentry_t));
+	*de = ds;
 	di->b->dirty = true;
 
@@ -451,5 +452,10 @@
 			return rc;
 		de->type = EXFAT_TYPE_NAME;
-		memcpy((uint8_t*)de->name.name, (uint8_t*)sname, sizeof(uint16_t)*chars);
+		/* test */
+		for (j=0; j<chars; j++){
+			de->name.name[j] = *sname;
+			sname++;
+		}
+
 		di->b->dirty = true;
 		sname += chars;
Index: uspace/srv/fs/exfat/exfat_ops.c
===================================================================
--- uspace/srv/fs/exfat/exfat_ops.c	(revision 602c3d8c0197058b083f35943efa51b1ecc9e46f)
+++ uspace/srv/fs/exfat/exfat_ops.c	(revision c56c45760d4350fae5a2a6a8f6cf12ce8cb4ba62)
@@ -125,5 +125,5 @@
 		df.attr = 0;
 
-	ds.firstc = host2uint32_t_le(node->firstc);
+	ds.firstc = node->firstc;
 	if (node->size == 0 && node->firstc == 0) {
 		ds.flags = 0;
@@ -132,6 +132,6 @@
 		ds.flags |= (!node->fragmented << 1);
 	}
-	ds.valid_data_size = host2uint64_t_le(node->size);
-	ds.data_size = host2uint64_t_le(node->size);
+	ds.valid_data_size = node->size;
+	ds.data_size = node->size;
 
 	exfat_directory_open_parent(&di, node->idx->devmap_handle, node->idx->pfc, 
@@ -335,5 +335,5 @@
 	switch (exfat_classify_dentry(d)) {
 	case EXFAT_DENTRY_FILE:
-		nodep->type = (d->file.attr & EXFAT_ATTR_SUBDIR)? 
+		nodep->type = (uint16_t_le2host(d->file.attr) & EXFAT_ATTR_SUBDIR)? 
 		    EXFAT_DIRECTORY : EXFAT_FILE;
 		rc = exfat_directory_next(&di);
@@ -349,18 +349,18 @@
 			return rc;
 		}
-		nodep->firstc = d->stream.firstc;
-		nodep->size = d->stream.data_size;
+		nodep->firstc = uint32_t_le2host(d->stream.firstc);
+		nodep->size = uint64_t_le2host(d->stream.data_size);
 		nodep->fragmented = (d->stream.flags & 0x02) == 0;
 		break;
 	case EXFAT_DENTRY_BITMAP:
 		nodep->type = EXFAT_BITMAP;
-		nodep->firstc = d->bitmap.firstc;
-		nodep->size = d->bitmap.size;
+		nodep->firstc = uint32_t_le2host(d->bitmap.firstc);
+		nodep->size = uint64_t_le2host(d->bitmap.size);
 		nodep->fragmented = true;
 		break;
 	case EXFAT_DENTRY_UCTABLE:
 		nodep->type = EXFAT_UCTABLE;
-		nodep->firstc = d->uctable.firstc;
-		nodep->size = d->uctable.size;
+		nodep->firstc = uint32_t_le2host(d->uctable.firstc);
+		nodep->size = uint64_t_le2host(d->uctable.size);
 		nodep->fragmented = true;
 		break;
@@ -1074,10 +1074,10 @@
 
 	bitmapp->type = EXFAT_BITMAP;
-	bitmapp->firstc = de->bitmap.firstc;
+	bitmapp->firstc = uint32_t_le2host(de->bitmap.firstc);
 	bitmapp->fragmented = true;
 	bitmapp->idx->parent_fragmented = true;
 	bitmapp->refcnt = 1;
 	bitmapp->lnkcnt = 0;
-	bitmapp->size = de->bitmap.size;
+	bitmapp->size = uint64_t_le2host(de->bitmap.size);
 
 	/* Initialize the uctable node. */
@@ -1116,10 +1116,10 @@
 
 	uctablep->type = EXFAT_UCTABLE;
-	uctablep->firstc = de->uctable.firstc;
+	uctablep->firstc = uint32_t_le2host(de->uctable.firstc);
 	uctablep->fragmented = true;
 	uctablep->idx->parent_fragmented = true;
 	uctablep->refcnt = 1;
 	uctablep->lnkcnt = 0;
-	uctablep->size = de->uctable.size;
+	uctablep->size = uint64_t_le2host(de->uctable.size);
 
 	rc = exfat_directory_close(&di);
