diff --git a/Source/Processors/DataThreads/RHD2000Editor.cpp b/Source/Processors/DataThreads/RHD2000Editor.cpp
index 8ebf2c5fa66b65555fee42e9b6dfff036fac2f2f..30285b166badfbe3ffb12d68cf9939342977415b 100644
--- a/Source/Processors/DataThreads/RHD2000Editor.cpp
+++ b/Source/Processors/DataThreads/RHD2000Editor.cpp
@@ -807,7 +807,6 @@ void RHD2000Editor::comboBoxChanged(ComboBox* comboBox)
 
 void RHD2000Editor::buttonEvent(Button* button)
 {
-    VisualizerEditor::buttonEvent(button);
     if (button == rescanButton && !acquisitionIsActive)
     {
         board->scanPorts();
@@ -848,6 +847,10 @@ void RHD2000Editor::buttonEvent(Button* button)
 	{
 		board->enableBoardLeds(button->getToggleState());
 	}
+	else
+	{
+		VisualizerEditor::buttonEvent(button);
+	}
 
 }
 
diff --git a/Source/Processors/DataThreads/RHD2000Thread.cpp b/Source/Processors/DataThreads/RHD2000Thread.cpp
index 7e176bd97771af06e6a6ef5bd039160bf0a7d492..d5fdacfad00a1005d88135e461638147e55fd1fc 100644
--- a/Source/Processors/DataThreads/RHD2000Thread.cpp
+++ b/Source/Processors/DataThreads/RHD2000Thread.cpp
@@ -1644,8 +1644,8 @@ int RHD2000Thread::getChannelFromHeadstage(int hs, int ch)
                     if (i < hs)
                         hsCount++;
                 }
-                return channelCount + hsCount * 3 + ch;
             }
+			return channelCount + hsCount * 3 + ch-headstagesArray[hs]->getNumActiveChannels();
         }
         else
         {