diff --git a/Code/Mantid/Framework/Algorithms/src/AddSampleLog.cpp b/Code/Mantid/Framework/Algorithms/src/AddSampleLog.cpp
index 7dc369f2e1cd854b654fe189b0aba56500bcec84..82ebc427417654aee3f2ae90780b9977873424ed 100644
--- a/Code/Mantid/Framework/Algorithms/src/AddSampleLog.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/AddSampleLog.cpp
@@ -66,33 +66,54 @@ void AddSampleLog::exec()
 
   // Remove any existing log
   if (theRun.hasProperty(propName))
+  {
     theRun.removeLogData(propName);
+  }
 
   if (propType == "String")
   {
     theRun.addLogData(new PropertyWithValue<std::string>(propName, propValue));
+    return;
+  }
+
+  bool valueIsInt(false);
+  int intVal;
+  double dblVal;
+  if ( Strings::convert(propValue, intVal) )
+  {
+    valueIsInt = true;
   }
-  else if (propType == "Number")
+  else if ( !Strings::convert(propValue, dblVal) )
   {
-    double val;
-    if (!Strings::convert(propValue, val))
-      throw std::invalid_argument("Error interpreting string '" + propValue + "' as a number.");
-    theRun.addLogData(new PropertyWithValue<double>(propName, val));
+    throw std::invalid_argument("Error interpreting string '" + propValue + "' as a number.");
+  }
+
+  if (propType == "Number")
+  {
+    if (valueIsInt) theRun.addLogData(new PropertyWithValue<int>(propName, intVal));
+    else theRun.addLogData(new PropertyWithValue<double>(propName, dblVal));
   }
   else if (propType == "Number Series")
   {
-    double val;
-    if (!Strings::convert(propValue, val))
-      throw std::invalid_argument("Error interpreting string '" + propValue + "' as a number.");
     Kernel::DateAndTime startTime;
     try {
       startTime = theRun.startTime();
     } catch (std::runtime_error&) {
       // Swallow the error - startTime will just be 0
     }
-    TimeSeriesProperty<double> * tsp = new TimeSeriesProperty<double>(propName);
-    tsp->addValue(startTime, val);
-    theRun.addLogData(tsp);
+
+    if (valueIsInt)
+    {
+      auto tsp = new TimeSeriesProperty<int>(propName);
+      tsp->addValue(startTime, intVal);
+      theRun.addLogData(tsp);
+    }
+    else
+    {
+      auto tsp = new TimeSeriesProperty<double>(propName);
+      tsp->addValue(startTime, dblVal);
+      theRun.addLogData(tsp);
+    }
   }
 }