diff --git a/lib/kmxgit_web/templates/repository/show_git_content.html.heex b/lib/kmxgit_web/templates/repository/show_git_content.html.heex
index ab50da0..6a836f7 100644
--- a/lib/kmxgit_web/templates/repository/show_git_content.html.heex
+++ b/lib/kmxgit_web/templates/repository/show_git_content.html.heex
@@ -22,5 +22,5 @@
<%= if String.match?(@git.content_type, ~r(^image/)) do %>
<img src={"data:#{@git.content_type};base64,#{Base.encode64(@git.content)}"}/>
<% end %>
- <%= link gettext("Download"), to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo, ["_blob", @branch | String.split(@path, "/")])), class: "btn btn-primary" %>
+ <%= link gettext("Download"), to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo, ["_blob", @tree | String.split(@path, "/")])), class: "btn btn-primary" %>
</div>