diff --git a/frontend-js/src/main/js/ServerConnector.js b/frontend-js/src/main/js/ServerConnector.js
index 61e9d9d1141079e126911d30fe5a1103e2ab93aa..9cd89e24d1b26d494e1a602134b2a4657694ef57 100644
--- a/frontend-js/src/main/js/ServerConnector.js
+++ b/frontend-js/src/main/js/ServerConnector.js
@@ -1691,8 +1691,7 @@ ServerConnector.addOverlayFromString = function(name, content) {
     description: "",
     filename: fileName
   });
-  var fileContent = new TextEncoder("UTF8").encode(content);
-  GuiConnector.showProcessing();
+  var fileContent = new TextEncoder("UTF8").encode(content);  
   self = this;
   return self.getProjectId().then(function (projectid) {
     
@@ -1705,8 +1704,7 @@ ServerConnector.addOverlayFromString = function(name, content) {
         overlay: overlay,
         projectId: self.getProjectId()
       });
-    }).then(function (result) {
-      GuiConnector.hideProcessing();
+    }).then(function (result) {      
       return result;
     });
   });
diff --git a/rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java b/rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java
index e51b523d0a85bf810a38d827c5e7467011b747ac..5ff64c9dc804176a7e71cfd3c282da5e5872e9d3 100644
--- a/rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java
+++ b/rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java
@@ -30,7 +30,6 @@ import lcsb.mapviewer.api.BaseRestImpl;
 import lcsb.mapviewer.api.ObjectExistsException;
 import lcsb.mapviewer.api.ObjectNotFoundException;
 import lcsb.mapviewer.api.QueryException;
-import lcsb.mapviewer.api.projects.models.bioEntities.AllBioeEntitiesTests;
 import lcsb.mapviewer.api.projects.models.publications.PublicationsRestImpl;
 import lcsb.mapviewer.commands.ClearColorModelCommand;
 import lcsb.mapviewer.commands.ColorExtractor;
@@ -53,7 +52,6 @@ import lcsb.mapviewer.converter.zip.ZipEntryFile;
 import lcsb.mapviewer.model.Project;
 import lcsb.mapviewer.model.cache.FileEntry;
 import lcsb.mapviewer.model.cache.UploadedFileEntry;
-import lcsb.mapviewer.model.map.BioEntity;
 import lcsb.mapviewer.model.map.InconsistentModelException;
 import lcsb.mapviewer.model.map.MiriamData;
 import lcsb.mapviewer.model.map.MiriamType;
@@ -351,8 +349,14 @@ public class ProjectRestImpl extends BaseRestImpl {
     SubModelCommand subModelCommand = new SubModelCommand(originalModel, polygon);
     Model part = subModelCommand.execute();
     
-    //Get list of oeverlay ids
-    String overlayIdsList[] = overlayIds.split(",");
+    //Get list of overlay ids
+    String[] overlayIdsList;    
+    if (overlayIds == null || overlayIds.trim().isEmpty()) {    	
+    	overlayIdsList = new String[0];
+    }
+    else {    	
+    	overlayIdsList = overlayIds.split(",");
+    }    
     // Remove all colors
     if (overlayIdsList.length > 0)
     {
@@ -363,7 +367,7 @@ public class ProjectRestImpl extends BaseRestImpl {
     }
     // Color with overlays
     for (String overlayId: overlayIdsList){
-    	Layout overlay = layoutService.getLayoutById(Integer.parseInt(overlayId), token);
+    	Layout overlay = layoutService.getLayoutById(Integer.parseInt(overlayId.trim()), token);
     	
     	ColorSchemaReader reader = new ColorSchemaReader();
     	Collection<ColorSchema> schemas = reader.readColorSchema(overlay.getInputData().getFileContent());