diff --git a/slsDetectorGui/include/qDefs.h b/slsDetectorGui/include/qDefs.h
index 84801f912..02710c710 100644
--- a/slsDetectorGui/include/qDefs.h
+++ b/slsDetectorGui/include/qDefs.h
@@ -145,7 +145,14 @@ static const int64_t GUI_VERSION=0x20121213;
static int Message(MessageIndex index, string message,string source)
{
static QMessageBox* msgBox;
+ size_t pos;
+ //replace all \n with
+ pos = 0;
+ while((pos = message.find("\n", pos)) != string::npos){
+ message.replace(pos, 1, "
");
+ pos += 1;
+ }
message.append(string("
Source: ") + source + string("
")); switch(index){