fixed non-root path bug and renaming issue