diff --git a/fslmaths.cc b/fslmaths.cc
index 52799f16646af8d4eb6d57d99474393efe897a8c..1a9b753905c5610a4e992501c03013244f5f6235 100755
--- a/fslmaths.cc
+++ b/fslmaths.cc
@@ -221,7 +221,7 @@ int inputParser(int argc, char *argv[], short output_dt)
               else if (string(argv[i]+2) == "mean")   inputVolume.value(x,y,z,t)=(T)column_volume.mean();
               else if (string(argv[i]+2) == "std")    inputVolume.value(x,y,z,t)=(T)column_volume.stddev();
 	      else if (string(argv[i]+2) == "maxn") {
-		vector<long long> iCoords;
+		vector<int64_t> iCoords;
 		volume<T> mask;
 		column_volume.max(mask,iCoords);
 		inputVolume.value(x,y,z,t)=iCoords[0];
diff --git a/fslstats.cc b/fslstats.cc
index e3c007216e70579f5aee25075fc8e84e5d87c213..8a653d2f783b29fa343862853bfb96939603f4a8 100644
--- a/fslstats.cc
+++ b/fslstats.cc
@@ -148,7 +148,7 @@ int fmrib_main_float(int argc, char* argv[],const bool timeseriesMode)
       }
     } else if (sarg=="-X") {
       ColumnVector coord(4);
-      vector<long long> iCoords;
+      vector<int64_t> iCoords;
       vol.min(mask,iCoords);
       coord << (Real)iCoords[7] << (Real)iCoords[8] << (Real)iCoords[9] << 1.0;
       coord = vol.niftivox2newimagevox_mat().i() * coord;
@@ -156,7 +156,7 @@ int fmrib_main_float(int argc, char* argv[],const bool timeseriesMode)
 	MISCMATHS::round(coord(2)) << " " << MISCMATHS::round(coord(3)) << " ";
     } else if (sarg=="-x") { 
       ColumnVector coord(4);
-      vector<long long> iCoords;
+      vector<int64_t> iCoords;
       vol.min(mask,iCoords);
       coord << (Real)iCoords[0] << (Real)iCoords[1] << (Real)iCoords[2] << 1.0;
       coord = vol.niftivox2newimagevox_mat().i() * coord;