diff --git a/MantidQt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp b/MantidQt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp
index 936b14fe13e1c90ef70233491321eb12c6bb205b..873d63c9ca53b1c5345ad40ad93da31e1c357628 100644
--- a/MantidQt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp
+++ b/MantidQt/CustomInterfaces/src/Indirect/ContainerSubtraction.cpp
@@ -220,13 +220,13 @@ bool ContainerSubtraction::validate() {
         AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(
             m_uiForm.dsContainer->getCurrentDataName().toStdString());
 
-    // Check Sample is of same type as container
+    // Check Sample is of same type as container (e.g. _red/_sqw)
     QString sample = m_uiForm.dsSample->getCurrentDataName();
     QString sampleType =
         sample.right(sample.length() - sample.lastIndexOf("_"));
     QString container = m_uiForm.dsContainer->getCurrentDataName();
     QString containerType =
-        container.right(sample.length() - container.lastIndexOf("_"));
+        container.right(container.length() - container.lastIndexOf("_"));
 
     g_log.debug() << "Sample type is: " << sampleType.toStdString()
                   << std::endl;