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 10f59bfadd62a60d573709dd627c8e5b1bd09468..0768945b285140af0133b5a6a44c53f89a3690af 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
@@ -559,7 +559,6 @@ public class ProjectRestImpl extends BaseRestImpl {
 
   protected String computePathForProject(String projectId, String path) {
     long id = projectDao.getNextId();
-    logger.debug(id);
     return path + "/../map_images/" + md5(projectId + "-" + id) + "/";
   }
 
diff --git a/service/src/main/java/lcsb/mapviewer/services/impl/ProjectService.java b/service/src/main/java/lcsb/mapviewer/services/impl/ProjectService.java
index f50002b773c058e6d125eea78c3841aa4ee1d77f..977c151b2c4aa597037e527e07c53c2ee6784bef 100644
--- a/service/src/main/java/lcsb/mapviewer/services/impl/ProjectService.java
+++ b/service/src/main/java/lcsb/mapviewer/services/impl/ProjectService.java
@@ -120,7 +120,7 @@ import lcsb.mapviewer.services.view.ProjectViewFactory;
 public class ProjectService implements IProjectService {
 
   /**
-   * Size of the artifitial buffer that will be released when
+   * Size of the artificial buffer that will be released when
    * {@link OutOfMemoryError} is thrown to gain some free memory and report
    * problem.
    */
@@ -132,7 +132,7 @@ public class ProjectService implements IProjectService {
   private static final double CREATION_OF_DATA = 0.50;
 
   /**
-   * How much time (out of 1.00) is used for upploading of the data from file.
+   * How much time (out of 1.00) is used for uploading of the data from file.
    */
   private static final double UPLOAD_OF_DATA = 0.50;
 
@@ -192,19 +192,19 @@ public class ProjectService implements IProjectService {
   private IUserService userService;
 
   /**
-   * Services that accessa data about chemicals.
+   * Services that access data about chemicals.
    */
   @Autowired
   private IChemicalService chemicalService;
 
   /**
-   * Services that accessa data about drugs.
+   * Services that access data about drugs.
    */
   @Autowired
   private IDrugService drugService;
 
   /**
-   * Services that accessa data about mirna.
+   * Services that access data about mirna.
    */
   @Autowired
   private IMiRNAService mirnaService;
@@ -414,8 +414,7 @@ public class ProjectService implements IProjectService {
       public void run() {
         if (async) {
           // because we are running this in separate thread we need to open a
-          // new
-          // session for db connection
+          // new session for db connection
           dbUtils.createSessionForCurrentThread();
         }
 
@@ -445,6 +444,17 @@ public class ProjectService implements IProjectService {
             }
             email = project.getNotifyEmail();
           }
+          if (homeDir != null) {
+            File homeDirFile = new File(homeDir);
+            if (homeDirFile.exists()) {
+              logger.debug("Removing project directory: " + homeDirFile.getAbsolutePath());
+              try {
+                FileUtils.deleteDirectory(homeDirFile);
+              } catch (IOException e) {
+                logger.error("Problem with removing diriectory", e);
+              }
+            }
+          }
           projectDao.delete(project);
           if (async) {
             projectDao.commit();
@@ -471,17 +481,6 @@ public class ProjectService implements IProjectService {
             dbUtils.closeSessionForCurrentThread();
           }
         }
-        if (homeDir != null) {
-          File homeDirFile = new File(homeDir);
-          if (homeDirFile.exists()) {
-            logger.debug("Removing project directory: " + homeDirFile.getAbsolutePath());
-            try {
-              FileUtils.deleteDirectory(homeDirFile);
-            } catch (IOException e) {
-              logger.error("Problem with removing diriectory", e);
-            }
-          }
-        }
 
       }
     });