Index: /trunk/psastro/src/psastro.c
===================================================================
--- /trunk/psastro/src/psastro.c	(revision 42380)
+++ /trunk/psastro/src/psastro.c	(revision 42381)
@@ -29,8 +29,6 @@
 
     // load configuration information
-    pmConfig *config = config = psastroArguments(argc, argv);
-    if (!config) {
-        usage();
-    }
+    pmConfig *config = psastroArguments(argc, argv);
+    if (!config) usage();
 
     psastroVersionPrint();
Index: /trunk/psastro/src/psastroDataSave.c
===================================================================
--- /trunk/psastro/src/psastroDataSave.c	(revision 42380)
+++ /trunk/psastro/src/psastroDataSave.c	(revision 42381)
@@ -75,8 +75,7 @@
                 if (hdu && hdu != lastHDU) {
                     psastroVersionHeaderFull(hdu->header);
-		    // Append teh reference catalog to the header as well.
-		    psMetadata *recipe = psMetadataLookupPtr(NULL, config->recipes, PSASTRO_RECIPE);
-		    psMetadataAddStr(hdu->header,PS_LIST_TAIL,"PSREFCAT",PS_META_REPLACE,NULL,
-				     psMetadataLookupStr(NULL,recipe,"PSASTRO.CATDIR"));
+		    // Append the reference catalog to the header as well.
+		    char *catdir = psMetadataLookupStr(NULL, recipe, "PSASTRO.CATDIR");
+		    psMetadataAddStr(hdu->header, PS_LIST_TAIL, "PSREFCAT", PS_META_REPLACE, NULL, catdir);
                     lastHDU = hdu;
                 }
