Index: trunk/FACT++/src/fitsdump.cc
===================================================================
--- trunk/FACT++/src/fitsdump.cc	(revision 12724)
+++ trunk/FACT++/src/fitsdump.cc	(revision 12725)
@@ -13,5 +13,5 @@
 #include "externals/fits.h"
 
-//#define PLOTTING_PLEASE
+#define PLOTTING_PLEASE
 
 #ifdef PLOTTING_PLEASE
@@ -541,5 +541,5 @@
     cout << "Max: " << reinterpret_cast<T*>(array)[numElems-1] << endl;
     if (numElems%2 == 0)
-        cout << "Med: " << (reinterpret_cast<T*>(array)[numElems/2] + reinterpret_cast<int16_t*>(array)[numElems/2+1])/2.f << endl;
+        cout << "Med: " << (reinterpret_cast<T*>(array)[numElems/2] + reinterpret_cast<T*>(array)[numElems/2+1])/2.f << endl;
     else
         cout << "Med: " << reinterpret_cast<T*>(array)[numElems/2+1] << endl;
@@ -616,5 +616,5 @@
                         break;
                 case 'D':
-                        reinterpret_cast<float*>(*statsIt)[i - rangesIt->first + row*span] = reinterpret_cast<double*>(it->second)[i];
+                        reinterpret_cast<double*>(*statsIt)[i - rangesIt->first + row*span] = reinterpret_cast<double*>(it->second)[i];
                         break;
                 default:
@@ -920,6 +920,9 @@
     for (auto it = xValues.begin(); it != xValues.end(); it++)
         delete[] *it;
+
     delete[] yValues;
+
     delete[] handle;
+
     return 0;
 }
