diff --git a/src/js/extendedFamilyModeJS.tw b/src/js/extendedFamilyModeJS.tw
index 29aab10992026f75be937dc4448c286c795bb50c..587edad98c8782d5770596542c5991efd8341f65 100644
--- a/src/js/extendedFamilyModeJS.tw
+++ b/src/js/extendedFamilyModeJS.tw
@@ -56,7 +56,9 @@ window.areTwins = function(slave1, slave2) {
 window.areSisters = function(slave1, slave2) {
 	if (slave1.ID == slave2.ID) {
 		return 0; //you are not your own sister
-	} else if ((slave1.father != 0 && slave1.father != -2) || (slave1.mother != 0 && slave1.mother != -2)) {
+    } else if (((slave1.father == 0) || (slave1.father == -2)) && ((slave1.mother == 0) || (slave1.mother == -2))) {
+		return 0; //not related
+	} else {
 		if (sameDad(slave1, slave2) == false && sameMom(slave1, slave2) == true) {
 			return 3; //half sisters
 		} else if (sameDad(slave1, slave2) == true && sameMom(slave1, slave2) == false) {
@@ -74,8 +76,6 @@ window.areSisters = function(slave1, slave2) {
 		} else {
 			return 0; //not related
 		}
-	} else {
-		return 0; //not related
 	}
 };