diff --git a/misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm b/misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
index ab80b25e87c265b5fec7d61ac1719750b3bb5f2b..b2313c8b4caa6ac607e586a84a2e9dfb6a1fbf47 100644
--- a/misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
+++ b/misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
@@ -44,7 +44,7 @@ my $xref_password = "ensembl";
 
 sub dump_seqs{
   my ($self, $xref) = @_;
-  $self->dump_ensembl($slice);
+  $self->dump_ensembl();
   $self->dump_xref($xref);
 }
 
@@ -96,7 +96,7 @@ sub dump_xref{
   $sql   .= "where p.xref_id = x.xref_id and ";
   $sql   .= "      p.sequence_type ='dna' and ";
   $sql   .= "      x.species_id = ".$species_id." ";
-  $sth = dbi()->prepare($sql);
+  $sth = $xref->dbi()->prepare($sql);
   $sth->execute();
   my $i = 0;
   while(my @row = $sth->fetchrow_array()){
@@ -120,7 +120,7 @@ ENDDNA:
   $sql   .= "where p.xref_id = x.xref_id and ";
   $sql   .= "      p.sequence_type ='peptide' and ";
   $sql   .= "      x.species_id = ".$species_id." ";
-  $sth = dbi()->prepare($sql);
+  $sth = $xref->dbi()->prepare($sql);
   $sth->execute();
   $i = 0;
   while(my @row = $sth->fetchrow_array()){
diff --git a/misc-scripts/xref_mapping/XrefMapper/db.pm b/misc-scripts/xref_mapping/XrefMapper/db.pm
index 5b8f23af91a563e69cdb40c55204b0e750625839..047a1bbdcf480cc8b2f609c8bfbce8f0e6171771 100644
--- a/misc-scripts/xref_mapping/XrefMapper/db.pm
+++ b/misc-scripts/xref_mapping/XrefMapper/db.pm
@@ -73,7 +73,7 @@ sub dbi {
 
   my $self = shift;
 
-  my $dbi = DBI->connect("dbi:mysql:host=".$self->host().";port=".$self->port().";database="$self->database(),
+  my $dbi = DBI->connect("dbi:mysql:host=".$self->host().";port=".$self->port().";database=".$self->dbname(),
                         $self->user,
                         $self->password,
  			 {'RaiseError' => 1}) || die "Can't connect to database";
diff --git a/misc-scripts/xref_mapping/xref_mapper.input b/misc-scripts/xref_mapping/xref_mapper.input
index 7caffcd388b4aa0239fac77a74eb8f9c03920064..ce7a273fa4bd0f6a43eac8d419203acb6f7d6f58 100644
--- a/misc-scripts/xref_mapping/xref_mapper.input
+++ b/misc-scripts/xref_mapping/xref_mapper.input
@@ -9,7 +9,7 @@ dir=./xref
 species=homo_sapiens
 host=ecs2
 port=3365
-dbname=homo_sapiens_core_24_34e
+dbname=homo_sapiens_core_25_34e
 user=ensro
 password=
 dir=./test