diff --git a/html/js/tree/Tree.js b/html/js/tree/Tree.js
index 4d4ecff..aa4b36c 100644
--- a/html/js/tree/Tree.js
+++ b/html/js/tree/Tree.js
@@ -758,7 +758,7 @@ GTE.TREE = (function (parentModule) {
} else if (this.iSetsSharePathFromRoot(a, b)) {
window.alert("Couldn't merge the information sets." +
"Please select two information sets that do not share a path from root.");
- } else if (a.firstNode === this.root && b.firstNode === this.root) {
+ } else if (a.firstNode === this.root || b.firstNode === this.root) {
window.alert("Couldn't merge the information sets." +
"Please select two information sets that do not share a path from root.");
}else {