diff --git a/modules/io/src/img/map_io_spi_handler.cc b/modules/io/src/img/map_io_spi_handler.cc
index feb9cb2a217bc32c1a84173b22633a75a10056d8..ad261daf908ec2bc0294f9b52e56a0d345d8553f 100644
--- a/modules/io/src/img/map_io_spi_handler.cc
+++ b/modules/io/src/img/map_io_spi_handler.cc
@@ -390,9 +390,8 @@ template <typename B >
 void real_dumper(std::ostream& f,  const spider_header& header, const img::ImageHandle& mh,const img::alg::Normalizer& norm, bool swap_flag)
 {
   int padding = header.fLabbyt-f.tellp();
-  char* buffer=new char[padding];
-  f.write(buffer,padding);
-  delete[] buffer;
+  std::vector<char> buffer(padding,0);
+  f.write(&buffer[0],padding);
   int slice_size=static_cast<int>(header.fNcol) * static_cast<int>(header.fNrow);
   boost::scoped_array<B> rawp(new B[slice_size]);
 
diff --git a/modules/io/src/img/map_io_tiff_handler.cc b/modules/io/src/img/map_io_tiff_handler.cc
index 0f418bc896c6f0563a5a3a0d38d1e5aecfe6495e..e6144315b78e3c2c13ddd7669f68ca841b983d0d 100644
--- a/modules/io/src/img/map_io_tiff_handler.cc
+++ b/modules/io/src/img/map_io_tiff_handler.cc
@@ -51,7 +51,8 @@ String TIF::FORMAT_STRING="defined_tiff";
   normalize_on_save_(normalize_on_save),
   bit_depth_(bit_depth),
   signed_(sign),
-  phasecolor_(phasecolor)
+  phasecolor_(phasecolor),
+  subimage_(subimage)
 {
 }
 
@@ -60,7 +61,8 @@ TIF::TIF(String format_string, boost::logic::tribool  normalize_on_save, Format
   normalize_on_save_(normalize_on_save),
   bit_depth_(bit_depth),
   signed_(sign),
-  phasecolor_(phasecolor)
+  phasecolor_(phasecolor),
+  subimage_(subimage)
 {
 }