diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js
index 425f7d8e1be490b5c081858597b8b46e91bd5b0b..d25d6d1471ac25b27860759b25d2827e57cec735 100644
--- a/src/js/slaveCostJS.js
+++ b/src/js/slaveCostJS.js
@@ -1811,20 +1811,20 @@ globalThis.FResultArray = (function() {
 	 * @param {App.Entity.SlaveState} slave
 	 */
 	function calcWorksWithRelatives(slave) {
-		V.slaves.forEach(islave => {
-			if (isParentP(slave, islave) && sameAssignmentP(slave, islave)) {
+		V.slaves.forEach(potentialRel => {
+			if (isParentP(slave, potentialRel) && sameAssignmentP(slave, potentialRel)) {
 				adjustFResult(`Works with their parent(s)`, 1);
 				if (incestBonus) {
 					adjustFResult(`Works with their parent(s): incest bonus`, 1);
 				}
 			}
-			if (isParentP(islave, slave) && sameAssignmentP(slave, islave)) {
+			if (isParentP(potentialRel, slave) && sameAssignmentP(slave, potentialRel)) {
 				adjustFResult(`Works with their kid(s)`, 1);
 				if (incestBonus) {
 					adjustFResult(`Works with their kid(s): incest bonus`, 1);
 				}
 			}
-			if (areSisters(slave, islave) > 0 && sameAssignmentP(slave, islave)) {
+			if (areSisters(slave, potentialRel) > 0 && sameAssignmentP(slave, potentialRel)) {
 				adjustFResult(`Works with their sibling(s)`, 1);
 				if (incestBonus) {
 					adjustFResult(`Works with their sibling(s): incest bonus`, 1);