fixed so works when cwd isn't the repo