Index: /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/rd.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/rd.c	(revision 38335)
+++ /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/rd.c	(revision 38336)
@@ -192,6 +192,8 @@
     ftable.header[0].buffer = NULL;
     gfits_copy_header (&buf[0].header, ftable.header);
-    status = gfits_fread_ftable_data (f, &ftable, FALSE);  // this just reads the bytes (not even a SWAP)
-    status = gfits_uncompress_image (&buf[0].header, &buf[0].matrix, &ftable);
+    if (!gfits_fread_ftable_data (f, &ftable, FALSE)) { fprintf (stderr, "problem reading compressed image table data\n"); fclose (f); return FALSE; }
+    if (!gfits_byteswap_varlength_column (&ftable, 1)) { fprintf (stderr, "problem doing byteswap on compressed image metadata column\n"); fclose (f); gfits_free_table (&ftable); return FALSE; }
+    if (!gfits_uncompress_image (&buf[0].header, &buf[0].matrix, &ftable)) { fprintf (stderr, "problem uncompressing the image data\n"); fclose (f); gfits_free_table (&ftable); return FALSE; }
+
     // uncompressing the image leaves the format as an extension
     gfits_extended_to_primary (&buf[0].header, TRUE, "Standard FITS");
