if (getppid() == 1)
                        _exit(0);
 
-               /* Check if CWD is deleted and find a existing parent */
+               /* Check if CWD is deleted and find an existing parent */
                if (access(path, F_OK)) {
                        DPRINTF_S("dir deleted or moved");
 
-                       /* Save last working directory */
-                       xstrlcpy(lastdir, path, PATH_MAX);
-
-                       /* Save history */
-                       xstrlcpy(lastname, xbasename(path), NAME_MAX + 1);
-
                        xstrlcpy(newpath, path, PATH_MAX);
                        while (true) {
                                dir = visit_parent(path, newpath, &presel);
                                        if (!dir)
                                                dir = dirname(newpath);
                                        break;
-                               } else if (!dir) {
+                               }
+                               if (!dir) {
                                        xstrlcpy(path, newpath, PATH_MAX);
                                        continue;
                                }
                        xstrlcpy(path, dir, PATH_MAX);
 
                        setdirwatch();
-                       mvprintw(xlines - 1, 0, "folder disappeared\n");
+                       mvprintw(xlines - 1, 0, "cannot access directory\n");
                        xdelay();
                        goto begin;
                }