diff --git a/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
index 7443fda691439708e5cc42a6f7cacddb61857944..02dd1377cc6db88848c08f1e1c6f29dd941cf4ee 100644
--- a/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
@@ -1067,13 +1067,13 @@ sub update {
      if ( $update ) {
 
        $sth = $self->prepare("UPDATE gene
-                              SET    type = '$type',
-                                     analysis_id = $analysis,
-                                     display_xref_id = $dxref_id
+                              SET    type = ?,
+                                     analysis_id = ?,
+                                     display_xref_id = ?
                               WHERE  gene_id = ?
                             ");
 
-       $sth->execute($gene->dbID);
+       $sth->execute($gene->type, $gene->analysis->dbID, $gene->display_xref, $gene->dbID);
      }
    }
    else {