diff --git a/MantidPlot/src/ProjectRecovery.cpp b/MantidPlot/src/ProjectRecovery.cpp
index 9fc74f7c378741f110f4ab44967d5348d6742b7c..243e465125255bb831cf87ae7a7fdb7d8f6426bb 100644
--- a/MantidPlot/src/ProjectRecovery.cpp
+++ b/MantidPlot/src/ProjectRecovery.cpp
@@ -497,8 +497,9 @@ void ProjectRecovery::openInEditor(const Poco::Path &inputFolder,
 
   // Get length of recovery script
   std::ifstream fileCount(historyDest.toString());
-  auto lineLength = std::count(std::istreambuf_iterator<char>(fileCount),
-                               std::istreambuf_iterator<char>(), '\n');
+  int lineLength =
+      static_cast<int>(std::count(std::istreambuf_iterator<char>(fileCount),
+                                  std::istreambuf_iterator<char>(), '\n'));
   fileCount.close();
 
   // Update Progress bar
diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp
index c8bb1b2af082f9d1070b9edbbc853fb515c5bbf9..f6779ab1f7040784e3e15f6a47177d9a8c668d51 100644
--- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp
+++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp
@@ -150,7 +150,7 @@ operator=(const ProjectRecoveryPresenter &obj) {
   return *this;
 }
 
-void ProjectRecoveryPresenter::setUpProgressBar(size_t barMax) {
+void ProjectRecoveryPresenter::setUpProgressBar(int barMax) {
   if (m_openView == RecoveryView && m_recView) {
     m_recView->setProgressBarMaximum(barMax);
   } else if (m_failureView) {
diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h
index 3ae42ea80cf496db0d40260ee98a7c624372faa2..0b7d4e5890fdfd9ce619d58a1679ff40f2a6eb3f 100644
--- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h
+++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h
@@ -41,7 +41,7 @@ public:
   void emitAbortScript();
   void changeStartMantidToCancelLabel();
   void fillAllRows();
-  void setUpProgressBar(size_t barMax);
+  void setUpProgressBar(int barMax);
 
 private:
   friend class ProjectRecoveryView;