diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp
index 77777bceee998fb660f28cce2f2c3211e7c35b45..caef4b19e3ed3ddad42faab5029176eda877ce54 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp
@@ -165,8 +165,8 @@ void MaemoSshRunner::handleRemoteOutput(const QByteArray &curOutput)
                 charsToEmitCount = -1;
             }
         } else {
-            firstCharToEmit = 0;
-            charsToEmitCount = endMarkerPos;
+            firstCharToEmit = m_potentialEndMarkerPrefix.count();
+            charsToEmitCount = endMarkerPos - firstCharToEmit;
         }
     } else {
         if (m_endMarkerCount == 0) {