diff --git a/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm b/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
index ebcb156f6d089f4b185d44d579bc9922b750f24e..9209450ae6076ea7dfc11729833f4baf64531b57 100644
--- a/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
+++ b/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
@@ -285,7 +285,7 @@ sub process_dependents{
     $splonk{$ens_id} = $type;
   }
   foreach my $ens_id (@old_ensembl_ids) {
-    $get_type_sth->execute($ens_id,$old_master_xref);
+    $get_type_sth->execute($ens_id,$old_master_xref_id);
     my ($type) = $get_type_sth->fetchrow_array();
     $splonk{$ens_id} = $type;
   }