diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js
index eb0c8bc8bad759bcaa9db4bb11456a44c08351ae..a10e724c34c65f8d5fd9d0c684dc0b9d704acad2 100644
--- a/src/js/slaveListing.js
+++ b/src/js/slaveListing.js
@@ -482,7 +482,8 @@ App.UI.SlaveList.listNGPSlaves = function () {
 		SlaveSort.indices(importedSlavesIndices);
 		r += App.UI.tabbar.makeTab("remove", App.UI.SlaveList.render(importedSlavesIndices, [],
 			(s) => `<u><strong><span class="pink">${SlaveFullName(s)}</span></strong></u>`,
-			(s) => App.UI.passageLink('Remove from import list', thisPassage, `$slavesToImport -= 1, removeJob(${s}, "${NGPassignment}")`)));
+			(s, i) => App.UI.passageLink('Remove from import list', thisPassage,
+				`$slavesToImport -= 1, removeJob(${App.Utils.slaveRefString(i)}, "${NGPassignment}")`)));
 	} else {
 		r += App.UI.tabbar.makeTab("remove", `<em>No slaves will go with you to the new game</em>`);
 	}
@@ -492,7 +493,8 @@ App.UI.SlaveList.listNGPSlaves = function () {
 		SlaveSort.indices(slavesToImportIndices);
 		r += App.UI.tabbar.makeTab("assign", App.UI.SlaveList.render(slavesToImportIndices, [],
 			(s) => `<u><strong><span class="pink">${SlaveFullName(s)}</span></strong></u>`,
-			(s) => App.UI.passageLink('Add to import list', thisPassage, `$slavesToImport += 1, assignJob(${s}, "${NGPassignment}")`)));
+			(s, i) => App.UI.passageLink('Add to import list', thisPassage,
+				`$slavesToImport += 1, assignJob(${App.Utils.slaveRefString(i)}, "${NGPassignment}")`)));
 	} else {
 		r += App.UI.tabbar.makeTab("assign", `<strong>Slave import limit reached</strong>`);
 	}