Index: trunk/psModules/src/camera/pmHDU.c
===================================================================
--- trunk/psModules/src/camera/pmHDU.c	(revision 7604)
+++ trunk/psModules/src/camera/pmHDU.c	(revision 7717)
@@ -15,22 +15,15 @@
 {
     // Deal with the PHU case
-    if (strcasecmp(hdu->extname, "PHU") == 0 || hdu->phu) {
-        if (! psFitsMoveExtNum(fits, 0, false)) {
+    if (hdu->blankPHU) {
+        if (!psFitsMoveExtNum(fits, 0, false)) {
             psError(PS_ERR_IO, false, "Unable to move to primary header!\n");
             return false;
         }
-        hdu->phu = true;
-        return true;
-    }
-
-    if (! psFitsMoveExtName(fits, hdu->extname)) {
+        return true;
+    }
+
+    if (!psFitsMoveExtName(fits, hdu->extname)) {
         psError(PS_ERR_IO, false, "Unable to move to extension %s\n", hdu->extname);
         return false;
-    }
-    // Now, just in case for some reason the PHU has an extension name that we've moved to....
-    if (psFitsGetExtNum(fits) == 0) {
-        hdu->phu = true;
-    } else {
-        hdu->phu = false;
     }
 
@@ -61,12 +54,8 @@
 
     if (!extname || strlen(extname) == 0) {
-        hdu->phu = true;
-        hdu->extname = psStringCopy("PHU");
+        hdu->blankPHU = true;
+        hdu->extname = NULL;
     } else {
-        if (strcasecmp(extname, "PHU") == 0) {
-            hdu->phu = true;
-        } else {
-            hdu->phu = false;
-        }
+        hdu->blankPHU = false;
         hdu->extname = psStringCopy(extname);
     }
