diff --git a/dev-docs/source/BatchWidget/API/CodeExamples/change_color.py b/dev-docs/source/BatchWidget/API/CodeExamples/change_color.py
index c8bb1e1d2bb8d2fa0141329abee07d59828258a2..0cca7825a7bfcb3292a50cdd050ce086f5903157 100644
--- a/dev-docs/source/BatchWidget/API/CodeExamples/change_color.py
+++ b/dev-docs/source/BatchWidget/API/CodeExamples/change_color.py
@@ -18,6 +18,7 @@ def change_colour_to_red(self, location, column_index):
     cell.setBackgroundColor("#FF0000")
     self.table.setCellAt(location, column_index, cell)
 
+    
 def cell(text):
     return MantidQt.MantidWidgets.Batch.Cell(text)
 
diff --git a/qt/python/mantidqtpython/string.sip b/qt/python/mantidqtpython/string.sip
index 7d72328209d102ef49b992db251ad06ad4c786ec..f7c849c8facd1c95a40403be2ba30423472863ce 100644
--- a/qt/python/mantidqtpython/string.sip
+++ b/qt/python/mantidqtpython/string.sip
@@ -36,7 +36,7 @@
          Py_DECREF(s);
          return 1;
 	}
-	if (PyString_Check(sipPy)) {
+	if (STR_CHECK(sipPy)) {
          *sipCppPtr = new std::string(TO_CSTRING(sipPy));
      	return 1;
 	}
diff --git a/qt/python/mantidqtpython/vector.sip b/qt/python/mantidqtpython/vector.sip
index ead6d02a3b030f91e774af1121753086f4a498b4..34649bd445fa493541edba83df3e7863fe14ee71 100644
--- a/qt/python/mantidqtpython/vector.sip
+++ b/qt/python/mantidqtpython/vector.sip
@@ -144,7 +144,7 @@ template<TYPE>
 
 %ConvertFromTypeCode
   return vectorToPythonList(*sipCpp, [](int item) -> PyObject* {
-    return PyInt_FromLong(item);
+    return FROM_LONG(item);
   });
 %End
 
@@ -153,8 +153,8 @@ template<TYPE>
     // Check if type is compatible
     return isIterable(sipPy) || sipPy == Py_None;
   } else {
-    auto cppValue =  pythonListToVector<int>(sipPy, [&](PyObject* pyItem) -> boost::optional<int> {
-      if (!PyInt_Check(pyItem)) {
+    auto cppValue = pythonListToVector<int>(sipPy, [&](PyObject* pyItem) -> boost::optional<int> {
+      if (!INT_CHECK(pyItem)) {
         PyErr_Format(PyExc_TypeError, "object in iterable is not an int");
         return boost::none;
       } else {
@@ -179,7 +179,7 @@ template<TYPE>
 
 %ConvertFromTypeCode
   return vectorToPythonList(*sipCpp, [](unsigned int item) -> PyObject* {
-    return PyInt_FromLong(item);
+    return FROM_LONG(item);
   });
 %End
 
diff --git a/qt/widgets/common/src/Batch/RowLocation.cpp b/qt/widgets/common/src/Batch/RowLocation.cpp
index 0a2be9a40bc1a275b6f0d4d810098f07886662f2..ae64818c6fce4f92b628737b198ee2b8253fe05b 100644
--- a/qt/widgets/common/src/Batch/RowLocation.cpp
+++ b/qt/widgets/common/src/Batch/RowLocation.cpp
@@ -99,8 +99,8 @@ bool RowLocation::isSiblingOf(RowLocation const &other) const {
   if (!(isRoot() || other.isRoot())) {
     auto const &otherPath = other.path();
     if (depth() == other.depth())
-      return std::equal(m_path.cbegin(), m_path.cend() - 1, otherPath.cbegin(),
-                        otherPath.cend() - 1);
+      return boost::algorithm::equal(m_path.cbegin(), m_path.cend() - 1,
+                                     otherPath.cbegin(), otherPath.cend() - 1);
   }
   return false;
 }
@@ -116,8 +116,9 @@ bool RowLocation::isDescendantOf(RowLocation const &ancestor) const {
     } else {
       auto const &ancestorPath = ancestor.path();
       if (depth() > ancestor.depth())
-        return std::equal(m_path.cbegin(), m_path.cbegin() + ancestor.depth(),
-                          ancestorPath.cbegin(), ancestorPath.cend());
+        return boost::algorithm::equal(
+            m_path.cbegin(), m_path.cbegin() + ancestor.depth(),
+            ancestorPath.cbegin(), ancestorPath.cend());
     }
   }
   return false;