Index: trunk/psLib/src/fits/psFits.h
===================================================================
--- trunk/psLib/src/fits/psFits.h	(revision 41896)
+++ trunk/psLib/src/fits/psFits.h	(revision 42089)
@@ -60,5 +60,5 @@
     PS_FITS_SCALE_ASINH_STDEV_NEGATIVE, ///< Do asinh scaling, auto-scale to sample stdev, place mean at upper limit
     PS_FITS_SCALE_ASINH_STDEV_BOTH,     ///< Do asinh scaling, auto-scale to sample stdev, place mean at middle
-    PS_FITS_SCALE_ASINH_MANUAL          ///< Manual scaling after doing asinh scaling.
+    PS_FITS_SCALE_ASINH_MANUAL          ///< Manual scaling after doing asinh scaling.(use specified BSCALE, BZERO, BOFFSET, BSOFTEN)
 } psFitsScaling;
 
Index: trunk/psLib/src/fits/psFitsImage.c
===================================================================
--- trunk/psLib/src/fits/psFitsImage.c	(revision 41896)
+++ trunk/psLib/src/fits/psFitsImage.c	(revision 42089)
@@ -744,5 +744,5 @@
       }
     }	
-    // Remove any BSOFTENvalues that exist in the header if we are not using that scaling anymore
+    // Remove any BSOFTEN values that exist in the header if we are not using that scaling anymore
     if (options && (!((options->scaling == PS_FITS_SCALE_ASINH_RANGE)||
 		      (options->scaling == PS_FITS_SCALE_ASINH_MANUAL)||
Index: trunk/psLib/src/fits/psFitsScale.c
===================================================================
--- trunk/psLib/src/fits/psFitsScale.c	(revision 41896)
+++ trunk/psLib/src/fits/psFitsScale.c	(revision 42089)
@@ -963,4 +963,10 @@
         *bzero = options->bzero;
 	*boffset = options->boffset;
+        break;
+      case PS_FITS_SCALE_ASINH_MANUAL:
+        *bscale = options->bscale;
+        *bzero = options->bzero;
+	*boffset = options->boffset;
+	*bsoften = options->bsoften;
         break;
       default:
Index: trunk/psLib/src/fits/psFitsTableNew.c
===================================================================
--- trunk/psLib/src/fits/psFitsTableNew.c	(revision 41896)
+++ trunk/psLib/src/fits/psFitsTableNew.c	(revision 42089)
@@ -97,4 +97,5 @@
 freeTable(psFitsTable *table)
 {
+    if (!table) return;
     for (int col = 0; col < table->numCols; col++) {
         psFitsTableColumn *column = &table->columns[col];
@@ -176,4 +177,7 @@
 {
     // add any element frees here
+    if (!column) return;
+
+    psFree (column->name);
     return;
 }
@@ -195,4 +199,5 @@
     psFitsTableColumn *column = psFitsTableColumnAlloc (name, type);
     psArrayAdd (tableColumns, 10, column);
+    psFree (column);
     return true;
 }
