diff --git a/CHANGELOG b/CHANGELOG
index 7db81adb9108f9b485381dfe8f657a1243c580e7..2169f9a89f3acd4bb26fc3b5e55cef322d281de5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,6 @@
 minerva (12.2.0~beta.0) unstable; urgency=medium
   * Feature: bug report utility
-  * Small improvement: JS plugin can create listener that is triggered on 
+  * Small improvement: JS plugin can create listener that is triggered on
     search results focus change
 
  -- Piotr Gawron <piotr.gawron@uni.lu>  Wed, 23 Jan 2019 15:00:00 +0200
@@ -14,68 +14,80 @@ minerva (12.2.0~alpha.1) unstable; urgency=medium
 minerva (12.2.0~alpha.0) unstable; urgency=medium
   * Feature: url GET parameters support all kind of search and selected overlays
     highlight
-  * Feature: user can create custom logging configuration in file 
+  * Feature: user can create custom logging configuration in file
     /etc/minerva/log4j.properties
   * Feature: plugin panel in admin allows to configure set of available plugins
   * Feature: import export from SBML supports RENDER package
   * Feature: import export from SBML supports MULTI package
-  * Feature: API tool providing possibility to transform different types of 
+  * Feature: API tool providing possibility to transform different types of
     file formats
-  * Feature: current state of the browsed map is reflected in the url (position, 
+  * Feature: current state of the browsed map is reflected in the url (position,
     zoom, overlays, search queries, etc.)
   * Small improvement: export to SBML includes unit factors
   * Small improvement: mesh identifiers are resolved to meshb.nlm.nih.gov urls
-  * Small improvement: genetics information allows to provide information about 
+  * Small improvement: genetics information allows to provide information about
     modification on peptide level that could be visualized in MolArt
-  * Small improvement: allow to control the background and font color of areas 
+  * Small improvement: allow to control the background and font color of areas
     drawn from text areas in CellDesigner "layers"
-  * Small improvement: config logo location is relative to the root minerva 
+  * Small improvement: config logo location is relative to the root minerva
     deployment directory
   * Small improvement: there is branding minerva logo in the left panel
-  * Small improvement: there is possibility to download part of the map limited 
-    to set of reactions/elements 
-  * Small improvement: allow admin to configure parameters displayed in the 
-    left panel 
-  * Small improvement: arrows for Transcription Starting Sites looks more like 
-    in CellDesigner 
-  * Small improvement: popup window appear with info about exceeding max number 
-    of search results when necessary  
-  * Small improvement: plugins can define default width of the container tab  
-  * Small improvement: new miriam type is handled: ClinicalTrials.gov  
-  * Small improvement: click on the border of compartment select the 
-    compartment  
+  * Small improvement: there is possibility to download part of the map limited
+    to set of reactions/elements
+  * Small improvement: allow admin to configure parameters displayed in the
+    left panel
+  * Small improvement: arrows for Transcription Starting Sites looks more like
+    in CellDesigner
+  * Small improvement: popup window appear with info about exceeding max number
+    of search results when necessary
+  * Small improvement: plugins can define default width of the container tab
+  * Small improvement: new miriam type is handled: ClinicalTrials.gov
+  * Small improvement: click on the border of compartment select the
+    compartment
   * Small improvement: there is max size of the map in configuration panel that
     disables upload of too big files
-  * Small improvement: hitting enter on login page logs in the user (no need to 
+  * Small improvement: hitting enter on login page logs in the user (no need to
     click on the login button)
-  * Small improvement: refresh button in overlays panel (useful when data 
+  * Small improvement: refresh button in overlays panel (useful when data
     overlays are uploaded separately in using API calls)
   * Small improvement: list of publications is downloadable
   * Small improvement: export of reactions support filtering by reaction type
-  * Small improvement: 'BACK TO MAP' link is available only when guest account 
+  * Small improvement: 'BACK TO MAP' link is available only when guest account
     has proper access level
   * Small improvement: 'REQUEST AN ACCOUNT' link is available only the contact
-    email account is provided 
-  * Small improvement: Plugin API allows to show/hide data overlays 
+    email account is provided
+  * Small improvement: Plugin API allows to show/hide data overlays
   * Bug fix: export to CellDesigner align inhibition reaction properly
   * Bug fix: export/import to/from SBML handles Heterodimer Association
     reaction properly
   * Bug fix: logo doesn't need to be square
-  * Bug fix: when clicking on a search link (in overview window), input in the 
+  * Bug fix: when clicking on a search link (in overview window), input in the
     left tab was not modified
-  * Bug fix: in admin panel changing of genome version is blocking interface 
+  * Bug fix: in admin panel changing of genome version is blocking interface
     until data about url is retrieved
-  * Bug fix: export of species inside complex into CellDesigner was causing 
-    problems when reading the file in CellDesigner 
+  * Bug fix: export of species inside complex into CellDesigner was causing
+    problems when reading the file in CellDesigner
   * Bug fix: export to SBGN did not export compartments
   * Bug fix: export of complex states to SBGN did not work
-  * Bug fix: type of the data overlay can be defined in the file content 
+  * Bug fix: type of the data overlay can be defined in the file content
     (useful when uploading genetic variants)
   * Bug fix: CLEAR button clears comment checkbox if necessary
   * Bug fix: minerva install problem on ubuntu 16 fixed
 
  -- Piotr Gawron <piotr.gawron@uni.lu>  Fri, 11 Jan 2019 12:00:00 +0200
 
+minerva (12.1.6) stable; urgency=medium
+  * Bug fix: logo on login page was broken with image link being full url
+  * Bug fix: plugin API had sometimes problems with fetching reactions
+    properly
+  * Bug fix: upload of data overlays without privileges triggers proper
+    error message also in situation when user cannot create projects
+  * Bug fix: first login on website when there is Term of use to accept
+    raised error for regular users
+  * Bug fix: fetching some drugs via API could cause 500
+
+ -- Piotr Gawron <piotr.gawron@uni.lu>  Mon, 28 Jan 2019 16:00:00 +0200
+
 minerva (12.1.5) stable; urgency=medium
   * Bug fix: Drugbank changed output format which crashed drug connector
   * Bug fix: word wrapping fixed in overlay table for long overlay names
diff --git a/annotation/src/main/java/lcsb/mapviewer/annotation/services/PubmedParser.java b/annotation/src/main/java/lcsb/mapviewer/annotation/services/PubmedParser.java
index 65bb1b2a402976f489ac271f91880f56fe271d2a..15bacd4c643e0d7321abcf12b01f2d0013097498 100644
--- a/annotation/src/main/java/lcsb/mapviewer/annotation/services/PubmedParser.java
+++ b/annotation/src/main/java/lcsb/mapviewer/annotation/services/PubmedParser.java
@@ -208,6 +208,13 @@ public class PubmedParser extends CachableInterface implements IExternalService
     return result;
   }
 
+  public Article getPubmedArticleById(String id) throws PubmedSearchException {
+    if (id==null) {
+      return null;
+    }
+    return getPubmedArticleById(Integer.valueOf(id.trim()));
+  }
+
   /**
    * This method return html \< a\ > tag with link for pubmed id (with some
    * additional information).
diff --git a/frontend-js/src/main/js/ServerConnector.js b/frontend-js/src/main/js/ServerConnector.js
index cbec64df630dabda7c62ed3c8ce9575992e57e40..1a2af2afb2a2ac2719953ad8d74361445edd76fe 100644
--- a/frontend-js/src/main/js/ServerConnector.js
+++ b/frontend-js/src/main/js/ServerConnector.js
@@ -37,6 +37,7 @@ var SbmlParameter = require('./map/data/SbmlParameter');
 var SecurityError = require('./SecurityError');
 var SessionData = require('./SessionData');
 var User = require('./map/data/User');
+var PrivilegeType = require('./map/data/PrivilegeType');
 
 var GuiConnector = require('./GuiConnector');
 
@@ -1299,9 +1300,17 @@ ServerConnector.updateUser = function (user) {
       connectedToLdap: user.isConnectedToLdap()
     }
   };
-  return self.sendPatchRequest(self.getUserUrl(queryParams), filterParams).then(function () {
+  var canModifyPrivileges = false;
+  return self.sendPatchRequest(self.getUserUrl(queryParams), filterParams).then(function (response) {
+    canModifyPrivileges = JSON.parse(response).privileges.some(function (privilege) {
+      return privilege.type === PrivilegeType.USER_MANAGEMENT
+        || privilege.type === PrivilegeType.PROJECT_MANAGEMENT;
+    });
     return self.getConfiguration();
   }).then(function (configuration) {
+    if (!canModifyPrivileges) {
+      return Promise.resolve(user);
+    }
     return self.updateUserPrivileges({user: user, privileges: user.privilegesToExport(configuration)});
   });
 };
diff --git a/frontend-js/src/main/js/map/data/MapModel.js b/frontend-js/src/main/js/map/data/MapModel.js
index 6b5e2509fc612dc41debcf5d6c57ec588832ca51..dae30089050d769b04b3f39137a1fa808f92f94d 100644
--- a/frontend-js/src/main/js/map/data/MapModel.js
+++ b/frontend-js/src/main/js/map/data/MapModel.js
@@ -237,17 +237,17 @@ MapModel.prototype.getCompleteReactionById = function (id) {
       var i;
       result = self._reactions[id];
       for (i = 0; i < result.getReactants().length; i++) {
-        if (!(result.getReactants()[i] instanceof Alias)) {
+        if (!(result.getReactants()[i].getAlias() instanceof Alias)) {
           result.getReactants()[i].setAlias(self._aliases[result.getReactants()[i].getAlias()]);
         }
       }
       for (i = 0; i < result.getProducts().length; i++) {
-        if (!(result.getProducts()[i] instanceof Alias)) {
+        if (!(result.getProducts()[i].getAlias() instanceof Alias)) {
           result.getProducts()[i].setAlias(self._aliases[result.getProducts()[i].getAlias()]);
         }
       }
       for (i = 0; i < result.getModifiers().length; i++) {
-        if (!(result.getModifiers()[i] instanceof Alias)) {
+        if (!(result.getModifiers()[i].getAlias() instanceof Alias)) {
           result.getModifiers()[i].setAlias(self._aliases[result.getModifiers()[i].getAlias()]);
         }
       }
diff --git a/frontend-js/src/main/js/map/window/AliasInfoWindow.js b/frontend-js/src/main/js/map/window/AliasInfoWindow.js
index f57b704bed212cd4ce7fcfd16e3ea3e2ed25962d..d0697336e1ed94b56beb4c00fa48784cf0acea17 100644
--- a/frontend-js/src/main/js/map/window/AliasInfoWindow.js
+++ b/frontend-js/src/main/js/map/window/AliasInfoWindow.js
@@ -434,7 +434,7 @@ AliasInfoWindow.prototype.createGenomicDiv = function (params) {
     }
     if (geneticInformation) {
       if (genomeUrls.length === 0) {
-        contentElement.innerHTML = "No reference genome data available on minerva platform";
+        contentElement.innerHTML = "No organism defined for this project, cannot display variant data";
       } else {
         for (i = 0; i < overlaysData.length; i++) {
           if (globalGeneVariants[i].length > 0) {
diff --git a/frontend-js/src/main/js/minerva.js b/frontend-js/src/main/js/minerva.js
index 2ba660e9114bd5fb53909657ae3edaf424edba20..e107db53e171ff4fff75a9dc46b3ce12f89c41d2 100644
--- a/frontend-js/src/main/js/minerva.js
+++ b/frontend-js/src/main/js/minerva.js
@@ -632,6 +632,9 @@ function createFooter() {
     var logoLink = configuration.getOption(ConfigurationType.LOGO_LINK).getValue();
     var logoText = configuration.getOption(ConfigurationType.LOGO_TEXT).getValue();
     var logoImg = configuration.getOption(ConfigurationType.LOGO_IMG).getValue();
+    if (!/^(f|ht)tps?:\/\//i.test(logoImg)) {
+      logoImg = GuiConnector.getImgPrefix() + logoImg;
+    }
     return functions.createElement({
       type: "div",
       className: "minerva-footer-table",
diff --git a/frontend-js/src/test/js/map/data/MapModel-test.js b/frontend-js/src/test/js/map/data/MapModel-test.js
index 48e43e712d2dd4090c8220ef956bfa5a02689cc4..032cf06adffd1462ecae8f63b14af8b54c7a87b5 100644
--- a/frontend-js/src/test/js/map/data/MapModel-test.js
+++ b/frontend-js/src/test/js/map/data/MapModel-test.js
@@ -2,6 +2,7 @@
 
 require("../../mocha-config");
 
+var Alias = require('../../../../main/js/map/data/Alias');
 var IdentifiedElement = require('../../../../main/js/map/data/IdentifiedElement');
 var MapModel = require('../../../../main/js/map/data/MapModel');
 var NetworkError = require('../../../../main/js/NetworkError');
@@ -95,21 +96,45 @@ describe('MapModel', function () {
     });
   });
 
-  it("getReactionById 1", function () {
-    var model = helper.createModel();
-
-    var reaction = helper.createReaction();
+  describe("getReactionById", function () {
+    it("not existing", function () {
+      var model = helper.createModel();
+
+      var reaction = helper.createReaction();
+
+      return model.getReactionById(reaction.getId()).then(function (result) {
+        assert.equal(null, result);
+      }, function (exception) {
+        assert.ok(exception instanceof NetworkError);
+        // check if this is exception about not finding file
+        model.addReaction(reaction);
+        return model.getReactionById(reaction.getId());
+      }).then(function (result) {
+        assert.equal(reaction, result);
+      });
+    });
 
-    return model.getReactionById(reaction.getId()).then(function (result) {
-      assert.equal(null, result);
-    }, function (exception) {
-      assert.ok(exception instanceof NetworkError);
-      // check if this is exception about not finding file
-      model.addReaction(reaction);
-      return model.getReactionById(reaction.getId());
-    }).then(function (result) {
-      assert.equal(reaction, result);
+    it("check reactants", function () {
+      var model;
+      return ServerConnector.getProject().then(function (project) {
+        model = project.getModels()[0];
+
+        return model.getReactionById(153510, true);
+      }).then(function (result) {
+        assert.ok(result.getReactants()[0].getAlias() instanceof Alias);
+        assert.ok(result.getProducts()[0].getAlias() instanceof Alias);
+        assert.ok(result.getModifiers()[0].getAlias() instanceof Alias);
+
+        //let assume we downloaded it partially
+        result.setIsComplete(false);
+        return model.getReactionById(153510, true);
+      }).then(function (result) {
+        assert.ok(result.getReactants()[0].getAlias() instanceof Alias);
+        assert.ok(result.getProducts()[0].getAlias() instanceof Alias);
+        assert.ok(result.getModifiers()[0].getAlias() instanceof Alias);
+      });
     });
+
   });
 
   it("addReaction 2", function () {
diff --git a/frontend-js/src/test/js/map/window/AliasInfoWindow-test.js b/frontend-js/src/test/js/map/window/AliasInfoWindow-test.js
index d36086b3e2db09d6e5c658288df266a3f8af37df..e55ce7dd67eea09457d359002e17021677f5118e 100644
--- a/frontend-js/src/test/js/map/window/AliasInfoWindow-test.js
+++ b/frontend-js/src/test/js/map/window/AliasInfoWindow-test.js
@@ -271,7 +271,7 @@ describe('AliasInfoWindow', function () {
         return win.createGenomicDiv({overlays: [overlay]});
       }).then(function (div) {
         assert.ok(div);
-        assert.ok(div.innerHTML.indexOf("No reference genome data available on minerva platform") === -1);
+        assert.ok(div.innerHTML.indexOf("No organism defined for this project, cannot display variant data") === -1);
         win.destroy();
       });
 
@@ -301,7 +301,7 @@ describe('AliasInfoWindow', function () {
         return win.createGenomicDiv({overlays: overlays});
       }).then(function (div) {
         assert.ok(div);
-        assert.ok(div.innerHTML.indexOf("No reference genome data available on minerva platform") === -1);
+        assert.ok(div.innerHTML.indexOf("No organism defined for this project, cannot display variant data") === -1);
         win.destroy();
       });
 
@@ -340,7 +340,7 @@ describe('AliasInfoWindow', function () {
         return win.createGenomicDiv({overlays: [overlay]});
       }).then(function (div) {
         assert.ok(div);
-        assert.ok(div.innerHTML.indexOf("No reference genome data available on minerva platform") >= -1);
+        assert.ok(div.innerHTML.indexOf("No organism defined for this project, cannot display variant data") >= -1);
         win.destroy();
       });
 
diff --git a/rest-api/src/main/java/lcsb/mapviewer/api/BaseRestImpl.java b/rest-api/src/main/java/lcsb/mapviewer/api/BaseRestImpl.java
index 4e635c49a08a86bf7f2cf6b5a6f448d502f9c85e..e7b443111d26d84cfb33fb20e40d476970389258 100644
--- a/rest-api/src/main/java/lcsb/mapviewer/api/BaseRestImpl.java
+++ b/rest-api/src/main/java/lcsb/mapviewer/api/BaseRestImpl.java
@@ -61,7 +61,7 @@ public abstract class BaseRestImpl {
   /**
    * Default class logger.
    */
-  private Logger logger = Logger.getLogger(BaseRestImpl.class);
+  private static Logger logger = Logger.getLogger(BaseRestImpl.class);
 
   @Autowired
   private IModelService modelService;
@@ -121,7 +121,7 @@ public abstract class BaseRestImpl {
       }
       if (MiriamType.PUBMED.equals(annotation.getDataType())) {
         try {
-          Article article = pubmedParser.getPubmedArticleById(Integer.valueOf(annotation.getResource()));
+          Article article = pubmedParser.getPubmedArticleById(annotation.getResource());
           result.put("article", article);
         } catch (PubmedSearchException e) {
           logger.error("Problem with accessing info about pubmed", e);
@@ -391,4 +391,20 @@ public abstract class BaseRestImpl {
     this.configurationService = configurationService;
   }
 
+  public MiriamConnector getMiriamConnector() {
+    return miriamConnector;
+  }
+
+  public void setMiriamConnector(MiriamConnector miriamConnector) {
+    this.miriamConnector = miriamConnector;
+  }
+
+  public PubmedParser getPubmedParser() {
+    return pubmedParser;
+  }
+
+  public void setPubmedParser(PubmedParser pubmedParser) {
+    this.pubmedParser = pubmedParser;
+  }
+
 }
diff --git a/rest-api/src/main/java/lcsb/mapviewer/api/files/FileRestImpl.java b/rest-api/src/main/java/lcsb/mapviewer/api/files/FileRestImpl.java
index 9aceba4b9639cddad4b436f60421b9071bd143ed..0100b22104c53cc825ec7b473d04735cd6b3df9b 100644
--- a/rest-api/src/main/java/lcsb/mapviewer/api/files/FileRestImpl.java
+++ b/rest-api/src/main/java/lcsb/mapviewer/api/files/FileRestImpl.java
@@ -35,10 +35,6 @@ public class FileRestImpl extends BaseRestImpl {
 
   public Map<String, Object> createFile(String token, String filename, String length) throws SecurityException {
     User user = getUserService().getUserByToken(token);
-    if (!getUserService().userHasPrivilege(user, PrivilegeType.ADD_MAP)
-        && overlayService.getAvailableCustomLayoutsNumber(user) == 0) {
-      throw new SecurityException("Access denied");
-    }
     UploadedFileEntry entry = new UploadedFileEntry();
     entry.setOriginalFileName(filename);
     entry.setFileContent(new byte[] {});
diff --git a/rest-api/src/test/java/lcsb/mapviewer/api/BaseRestImplTest.java b/rest-api/src/test/java/lcsb/mapviewer/api/BaseRestImplTest.java
index f5802d61013b00f5bf4bc444d41c6483c662e79d..5fde7baa71928f1c3e0a2ac7732e3f1ff059d7e1 100644
--- a/rest-api/src/test/java/lcsb/mapviewer/api/BaseRestImplTest.java
+++ b/rest-api/src/test/java/lcsb/mapviewer/api/BaseRestImplTest.java
@@ -6,12 +6,26 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.CALLS_REAL_METHODS;
 
+import java.util.Map;
+
 import org.apache.log4j.Logger;
 import org.junit.Test;
 import org.mockito.Mockito;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import lcsb.mapviewer.annotation.services.MiriamConnector;
+import lcsb.mapviewer.annotation.services.PubmedParser;
+import lcsb.mapviewer.model.map.MiriamData;
+import lcsb.mapviewer.model.map.MiriamType;
 
 public class BaseRestImplTest extends RestTestFunctions {
   Logger logger = Logger.getLogger(BaseRestImplTest.class);
+  
+  @Autowired
+  MiriamConnector mc;
+  
+  @Autowired
+  PubmedParser pubmedParser;
 
   @Test
   public void testMathMLToPresentationML() throws Exception {
@@ -39,6 +53,15 @@ public class BaseRestImplTest extends RestTestFunctions {
     assertFalse(presentationXml.startsWith("<?xml"));
   }
   
+  @Test
+  public void testCreateAnnotationWithWhitespace() throws Exception {
+    BaseRestImpl controller = Mockito.mock(BaseRestImpl.class, CALLS_REAL_METHODS);
+    controller.setMiriamConnector(mc);
+    controller.setPubmedParser(pubmedParser);
+    Map<String, Object> response = controller.createAnnotation(new MiriamData(MiriamType.PUBMED,"28255955 "));
+    assertNotNull(response);
+  }
+  
   
 
 }