diff --git a/.local/bin/dotsync b/.local/bin/dotsync
index 20ab80dd..9955369b 100755
--- a/.local/bin/dotsync
+++ b/.local/bin/dotsync
@@ -9,7 +9,7 @@ NC="$(tput sgr0)"
 target=$HOME
 gitdir=$target/.local/share/dots
 
-mkdir -p "$gitdir"
+mkdir -p "$(dirname "$gitdir")"
 
 baregit() {
     git --git-dir="$gitdir" --work-tree="$target" "$@"
@@ -54,7 +54,7 @@ if [ $needs_pop -eq 1 ]; then
 fi
 printf "\n"
 
-unmerged_files=$(dgit diff --name-only --diff-filter=U)
+unmerged_files=$(baregit diff --name-only --diff-filter=U)
 if [ -n "$unmerged_files" ]; then
     printf "%b" "${RED}The following files have merge conflicts after popping the stash:$NC\n\n"
     printf "%s" "$unmerged_files\n\n"