diff --git a/Builds/MacOSX/open-ephys.xcodeproj/project.xcworkspace/xcuserdata/ryan.xcuserdatad/UserInterfaceState.xcuserstate b/Builds/MacOSX/open-ephys.xcodeproj/project.xcworkspace/xcuserdata/ryan.xcuserdatad/UserInterfaceState.xcuserstate
index 0e2b6d35f67b53debf60191b7d45037186fbf5de..a17eff7f85236bcc11cb666b4d9c680fb1f6b991 100644
Binary files a/Builds/MacOSX/open-ephys.xcodeproj/project.xcworkspace/xcuserdata/ryan.xcuserdatad/UserInterfaceState.xcuserstate and b/Builds/MacOSX/open-ephys.xcodeproj/project.xcworkspace/xcuserdata/ryan.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/Source/Processors/Editors/GenericEditor.cpp b/Source/Processors/Editors/GenericEditor.cpp
index defee8da696cc16c74778d2eeefd3a9b39484ea1..9c77c1c990a08165ce114e48a2302ea5a60fc740 100755
--- a/Source/Processors/Editors/GenericEditor.cpp
+++ b/Source/Processors/Editors/GenericEditor.cpp
@@ -770,6 +770,12 @@ void TriangleButton::paintButton(Graphics& g, bool isMouseOver, bool isButtonDow
 }
 
 void GenericEditor::updateParameterButtons(int parameterIndex=-1){
+    if (parameterEditors.size()==0)
+    {
+        //Checks if there is a parameter editor, and stops a bug if there isn't.
+        std::cout << "No parameterEditors" << std::endl;
+    }
+    else{
     if (parameterIndex==-1){
         for (int i = 0; i < parameterEditors.size(); ++i)
         {
@@ -780,4 +786,5 @@ void GenericEditor::updateParameterButtons(int parameterIndex=-1){
         parameterEditors[parameterIndex]->channelSelectionUI();
     }
     std::cout << "updateParameterButtons" << std::endl;
+    }
 }
diff --git a/Source/Processors/Editors/ParameterEditor.cpp b/Source/Processors/Editors/ParameterEditor.cpp
index 1e5b9cd28cbea223a9229ca6c9f005e463d5ebef..b81d70cbc8fec835eac3f05212247f0d3fbb61d8 100755
--- a/Source/Processors/Editors/ParameterEditor.cpp
+++ b/Source/Processors/Editors/ParameterEditor.cpp
@@ -510,7 +510,6 @@ void ParameterEditor::channelSelectionUI()
 {
 
     int numChannels=channelSelector->getNumChannels();
-    Array<var> possibleValues=parameter->getPossibleValues();
     if (parameter->isBoolean())
     {
 
@@ -522,6 +521,7 @@ void ParameterEditor::channelSelectionUI()
     else if (parameter->isDiscrete())
     {
         std::cout << "Calculating colors for discrete buttons" << std::endl;
+        Array<var> possibleValues=parameter->getPossibleValues();
 
         for (int i = 0; i < buttonArray.size(); i++)
         {
diff --git a/Source/Processors/SourceNode.cpp b/Source/Processors/SourceNode.cpp
index c7f0145b3cc0bd4538c1a825dcc3f4cf023236b8..c69fb102eb27f4400255286c6ac3e9bf9cd1f52c 100755
--- a/Source/Processors/SourceNode.cpp
+++ b/Source/Processors/SourceNode.cpp
@@ -199,7 +199,6 @@ void SourceNode::enabledState(bool t)
 
 void SourceNode::setParameter(int parameterIndex, float newValue)
 {
-    editor->updateParameterButtons(parameterIndex);
     editor->updateParameterButtons(parameterIndex);
     //std::cout << "Got parameter change notification";
 }