diff --git a/frontend-js/src/main/js/ServerConnector.js b/frontend-js/src/main/js/ServerConnector.js
index cb9c8e5c83af74c46b5912a3e903265b1c960fa3..0a3aa0177fc3b76ada173781faf9830e7ac4e4d6 100644
--- a/frontend-js/src/main/js/ServerConnector.js
+++ b/frontend-js/src/main/js/ServerConnector.js
@@ -2018,9 +2018,9 @@ ServerConnector.getReferenceGenome = function (params) {
   var filterParams = {};
   if (params.genomeId !== undefined) {
     return self.getReferenceGenomes().then(function (referenceGenomes) {
-      for (var i = 0; i < referenceGenomes.leftPanel; i++) {
+      for (var i = 0; i < referenceGenomes.length; i++) {
         var genome = referenceGenomes[i];
-        if (genome.getId() === params.genomeId()) {
+        if (genome.getId() === params.genomeId) {
           return genome;
         }
       }
diff --git a/frontend-js/src/main/js/gui/admin/GenomeAdminPanel.js b/frontend-js/src/main/js/gui/admin/GenomeAdminPanel.js
index 133633f9daadb40963923e56cd1c906643d5c11a..061b6a70932f33e26991ff33ec33bc24bfc476be 100644
--- a/frontend-js/src/main/js/gui/admin/GenomeAdminPanel.js
+++ b/frontend-js/src/main/js/gui/admin/GenomeAdminPanel.js
@@ -106,7 +106,7 @@ GenomeAdminPanel.prototype._createGui = function () {
 
   $(genomesTable).on("click", "[name='editGenome']", function () {
     var button = this;
-    return self.showEditDialog($(button).attr("data")).catch(GuiConnector.alert);
+    return self.showEditDialog(parseInt($(button).attr("data"))).catch(GuiConnector.alert);
   });
 
 };
@@ -186,7 +186,6 @@ GenomeAdminPanel.prototype.genomeToTableRow = function (genome, user) {
   }
   row[5] = "<button name='editGenome' data='" + genome.getId() + "'" + disabled + "><i class='fa fa-edit' style='font-size:17px'></i></button>";
   row[6] = "<button name='removeGenome' data='" + genome.getId() + "'" + disabled + "><i class='fa fa-trash-o' style='font-size:17px'></button>";
-
   return row;
 };
 
@@ -247,6 +246,11 @@ GenomeAdminPanel.prototype.getDialog = function (genome) {
   }
 };
 
+/**
+ *
+ * @param {number} id
+ * @returns {Promise}
+ */
 GenomeAdminPanel.prototype.showEditDialog = function (id) {
   var self = this;
   GuiConnector.showProcessing();