diff --git a/src/clientgui.cpp b/src/clientgui.cpp
index 34c83824237575719925628ae13d5c6e4c05e7e9..058bc98d2a335215adf30f92c810bdd70c380deb 100644
--- a/src/clientgui.cpp
+++ b/src/clientgui.cpp
@@ -101,7 +101,10 @@ void ClientGui::handleMessageFromServer(const QString& message)
         case Protocol::Action::closeVacuumValve:
         case Protocol::Action::startAdc:
         case Protocol::Action::stopAdc:
+            break;
         case Protocol::Action::clearHistogram:
+            clearHistogram(true);
+            break;
         case Protocol::Action::adcThresholdUp:
         case Protocol::Action::adcThresholdDown:
         case Protocol::Action::queryServerInformation:
@@ -251,7 +254,7 @@ void ClientGui::fillEventsIntoHistogram(const QString& adcchannels)
     _rootcanvas.getCanvas()->Update();
 }
 
-void ClientGui::clearHistogram()
+void Fp311Online::ClientGui::clearHistogram(const bool fromServer)
 {
     sendSimpleActiontoServer(Protocol::Action::clearHistogram);
     for (int i = 0; i < ExperimentState::NumberOfAdcChannels - 1; i++)
@@ -260,7 +263,8 @@ void ClientGui::clearHistogram()
     _rootcanvas.getCanvas()->Modified();
     _rootcanvas.getCanvas()->Update();
 
-    sendSimpleActiontoServer(Protocol::Action::clearHistogram);
+    if (!fromServer)
+        sendSimpleActiontoServer(Protocol::Action::clearHistogram);
 }
 
 void ClientGui::showEvent(QShowEvent* event)
diff --git a/src/clientgui.h b/src/clientgui.h
index 5f8b370fd7a5e15203ee280a4125aad4e48c107e..411b64d710dbed4565b3ce414b4c476aa4ce22f2 100644
--- a/src/clientgui.h
+++ b/src/clientgui.h
@@ -85,7 +85,7 @@ private:
 
     void displayExperimentState();
     void fillEventsIntoHistogram(const QString& adcchannels);
-    void clearHistogram();
+    void clearHistogram(const bool fromServer = false);
 
     void showEvent(QShowEvent* event) override;