diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c
index b69dbd3..912061c 100644
--- a/backend/comics/comics-document.c
+++ b/backend/comics/comics-document.c
@@ -114,45 +114,44 @@ comics_decompress_temp_dir (const gchar       *command_decompress_tmp,
 				GError        **error)
 {
 	gboolean success;
-	gchar *std_out;
+	gchar *std_out, *aux;
 	GError *err = NULL;
 	gint retval;
 	
 	success = g_spawn_command_line_sync (command_decompress_tmp, &std_out, 
 						NULL, &retval, &err);
+	aux = g_path_get_basename (command);
 	if (!success) {
 		g_set_error (error,
 			EV_DOCUMENT_ERROR,
 			EV_DOCUMENT_ERROR_INVALID,
 			_("Error launching the %s command for decompressing \
-			the comic book to the temporary directory -- %s."),
-			g_path_get_basename (command),
-			err->message);
+			the comic book to the temporary directory."), aux);
+			g_warning ("g_spawn_command_line_sync error: %s", 
+				err->message);
 			g_error_free (err);
 	} else if (WIFEXITED (retval)) {
 		if (WEXITSTATUS (retval) == EXIT_SUCCESS) {
 			g_free (std_out);
+			g_free (aux);
 			return TRUE;
 		} else {
 			g_set_error (error,
 				EV_DOCUMENT_ERROR,
 				EV_DOCUMENT_ERROR_INVALID,
 				_("The command %s failed at decompressing the \
-				comic book in to temporary directory."), 
-				g_path_get_basename (command));
-			g_warning ("%s output: %s", g_path_get_basename 
-				(command), std_out);
+				comic book in to temporary directory."), aux);
+			g_warning ("%s output: %s", aux, std_out);
 			g_free (std_out);
 		}
 	} else {
 		g_set_error (error,
 			EV_DOCUMENT_ERROR,
 			EV_DOCUMENT_ERROR_INVALID,
-			_("The command %s does not end normally."), 
-			g_path_get_basename (command));
+			_("The command %s does not end normally."), aux);
 		g_free (std_out);
 	}
-	
+	g_free (aux);
 	return FALSE;
 }
 
@@ -164,7 +163,7 @@ comics_generate_command_lines (ComicsDocument *comics_document,
 			       GError        **error)
 {
 	gchar *quoted_file;
-	gchar *command_decompress_tmp;
+	gchar *command_decompress_tmp, *checksum;
 	
 	quoted_file = g_shell_quote (comics_document->archive);
 	
@@ -190,10 +189,11 @@ comics_generate_command_lines (ComicsDocument *comics_document,
 		
 		comics_document->flag_temp = TRUE;
 		
-		comics_document->dir = g_build_filename (ev_tmp_dir (),
-				g_compute_checksum_for_string (G_CHECKSUM_MD5, 
-				comics_document->archive, -1), NULL);
-						
+		checksum = g_compute_checksum_for_string (G_CHECKSUM_MD5, 
+				comics_document->archive, -1);
+		comics_document->dir = g_build_filename (ev_tmp_dir (), 
+						checksum, NULL);
+		g_free (checksum);
 		/* unrar-free can't create directories so we do it on its 
 		 * behalf */
 		if (g_mkdir_with_parents (comics_document->dir, 0700) != 0) {
@@ -672,14 +672,16 @@ comics_remove_dir (gchar *path_name)
 {
 	GDir  *content_dir;
 	const gchar *filename;
+	gchar *filename_with_path;
 	
 	if (g_file_test (path_name, G_FILE_TEST_IS_DIR)) {
 		content_dir = g_dir_open  (path_name, 0, NULL);
 		filename  = g_dir_read_name (content_dir);
-		while (filename) {			
-			comics_remove_dir (g_build_filename (path_name, 
-							filename, 
-							NULL));
+		while (filename) {
+			filename_with_path = g_build_filename (path_name, 
+						filename, NULL);
+			comics_remove_dir (filename_with_path);
+			g_free (filename_with_path);
 			filename = g_dir_read_name (content_dir);
 		}
 		g_dir_close (content_dir);
