Index: trunk/pswarp/src/pswarpLoop.c
===================================================================
--- trunk/pswarp/src/pswarpLoop.c	(revision 13686)
+++ trunk/pswarp/src/pswarpLoop.c	(revision 13705)
@@ -135,4 +135,8 @@
     }
 
+    output->data_exists = true;
+    outCell->data_exists = true;
+    outChip->data_exists = true;
+
 
     // XXX Hack so that INSTRUME header keyword and the like are not updated properly
@@ -163,4 +167,7 @@
 
     pmHDU *hdu = output->parent->parent->parent->hdu; // HDU for the output warped image
+    if (!hdu->header) {
+        hdu->header = psMetadataAlloc();
+    }
 
     // Add MD5 information for readout
