diff --git a/src/js/generateGenetics.tw b/src/js/generateGenetics.tw
index 4e997b202e85831f511323824f450513ed665c28..9a0e2c30dcc67f4904c0b26ad5a2e70a9228a362 100644
--- a/src/js/generateGenetics.tw
+++ b/src/js/generateGenetics.tw
@@ -12,13 +12,13 @@ window.generateGenetics = (function() {
 
 	function generateGenetics(actor1, actor2, x) {
 		V = State.variables;
-		genes = {gender: "XX", name: "blank", mother: 0, motherName: "none", father: 0, fatherName: "none", nationality: "Stateless", race: "white", intelligence: 0, face: 0, eyeColor: "brown", hColor: "black", skin: "white", markings: "none", behavioralFlaw: "none", sexualFlaw: "none", pubicHSyle: "bushy", underArmHStyle: "bushy", geneticQuirks: 0};
+		genes = {gender: "XX", name: "blank", surname: 0, mother: 0, motherName: "none", father: 0, fatherName: "none", nationality: "Stateless", race: "white", intelligence: 0, face: 0, eyeColor: "brown", hColor: "black", skin: "white", markings: "none", behavioralFlaw: "none", sexualFlaw: "none", pubicHSyle: "bushy", underArmHStyle: "bushy", geneticQuirks: 0};
 		mother = (actor1 > 0) ? V.genePool.findIndex(function(s) { return s.ID == actor1; }) : V.PC;
-		activeMother = (actor1 > 0) ? V.slaves[actor1] : V.PC;
+		activeMother = (actor1 > 0) ? V.slaves[V.slaveIndices[actor1]] : V.PC;
 		father = (actor2 > 0) ? V.genePool.findIndex(function(s) { return s.ID == actor2; })
 			: (actor2 == -1) ? V.PC
 			: 0;
-		activeFather = (father !== 0 && father.ID > 0) ? V.slaves[actor2]
+		activeFather = (father !== 0 && father.ID > 0) ? V.slaves[V.slaveIndices[actor2]]
 			: (father !== 0 && father.ID == -1) ? V.PC
 			: 0;