Index: trunk/ippToPsps/src/ippToPspsConfig.c
===================================================================
--- trunk/ippToPsps/src/ippToPspsConfig.c	(revision 27607)
+++ trunk/ippToPsps/src/ippToPspsConfig.c	(revision 27701)
@@ -735,30 +735,48 @@
 
                 case TBYTE:
-                    if (fromHeader) fits_read_key(fitsIn, TBYTE, table->columns[i].ippName, &int8col[0], NULL, &readStatus);
+                    if (fromHeader) {
+                        fits_read_key(fitsIn, TBYTE, table->columns[i].ippName, &int8col[0], NULL, &readStatus);
+                        if (!isnormal(int8col[0])) int8col[0] = int8null;
+                    }
                     else fits_read_col(fitsIn, TBYTE, table->columns[i].ippColNum, 1, 1, nRows, &int8null, int8col, &anynull, &readStatus);
                     fits_write_col(fitsOut, TBYTE, col, 1, 1, nRows, int8col, &writeStatus);
                     break;
                 case TSHORT:
-                    if (fromHeader) fits_read_key(fitsIn, TSHORT, table->columns[i].ippName, &int16col[0], NULL, &readStatus);
+                    if (fromHeader) {
+                        fits_read_key(fitsIn, TSHORT, table->columns[i].ippName, &int16col[0], NULL, &readStatus);
+                        if (!isnormal(int16col[0])) int16col[0] = int16null;
+                    }
                     else fits_read_col(fitsIn, TSHORT, table->columns[i].ippColNum, 1, 1, nRows, &int16null, int16col, &anynull, &readStatus);
                     fits_write_col(fitsOut, TSHORT, col, 1, 1, nRows, int16col, &writeStatus);
                     break;
                 case TLONG:
-                    if (fromHeader) fits_read_key(fitsIn, TLONG, table->columns[i].ippName, &longcol[0], NULL, &readStatus);
+                    if (fromHeader) {
+                        fits_read_key(fitsIn, TLONG, table->columns[i].ippName, &longcol[0], NULL, &readStatus);
+                        if (!isnormal(longcol[0])) longcol[0] = longnull;
+                    }
                     else fits_read_col(fitsIn, TLONG, table->columns[i].ippColNum, 1, 1, nRows, &longnull, longcol, &anynull, &readStatus);
                     fits_write_col(fitsOut, TLONG, col, 1, 1, nRows, longcol, &writeStatus);
                     break;
                 case TLONGLONG:
-                    if (fromHeader) fits_read_key(fitsIn, TLONGLONG, table->columns[i].ippName, &longcol[0], NULL, &readStatus);
+                    if (fromHeader) {
+                        fits_read_key(fitsIn, TLONGLONG, table->columns[i].ippName, &longcol[0], NULL, &readStatus);
+                        if (!isnormal(longcol[0])) longcol[0] = longnull;
+                    }
                     else fits_read_col(fitsIn, TLONGLONG, table->columns[i].ippColNum, 1, 1, nRows, &longnull, longcol, &anynull, &readStatus);
                     fits_write_col(fitsOut, TLONGLONG, col, 1, 1, nRows, longcol, &writeStatus);
                     break;
                 case TFLOAT:
-                    if (fromHeader) fits_read_key(fitsIn, TFLOAT, table->columns[i].ippName,&floatcol[0], NULL, &readStatus);
+                    if (fromHeader) {
+                        fits_read_key(fitsIn, TFLOAT, table->columns[i].ippName,&floatcol[0], NULL, &readStatus); 
+                        if (!isnormal(floatcol[0])) floatcol[0] = floatnull;
+                    }
                     else fits_read_col(fitsIn, TFLOAT, table->columns[i].ippColNum, 1, 1, nRows, &floatnull, floatcol, &anynull, &readStatus);
                     fits_write_col(fitsOut, TFLOAT, col, 1, 1, nRows, floatcol, &writeStatus);
                     break;
                 case TDOUBLE:
-                    if (fromHeader) fits_read_key(fitsIn, TDOUBLE, table->columns[i].ippName, &doublecol[0], NULL, &readStatus);
+                    if (fromHeader) {
+                        fits_read_key(fitsIn, TDOUBLE, table->columns[i].ippName, &doublecol[0], NULL, &readStatus);
+                        if (!isnormal(doublecol[0])) doublecol[0] = doublenull;
+                    }
                     else fits_read_col(fitsIn, TDOUBLE, table->columns[i].ippColNum, 1, 1, nRows, &doublenull, doublecol, &anynull, &readStatus);
                     fits_write_col(fitsOut, TDOUBLE, col, 1, 1, nRows, doublecol, &writeStatus);
