diff --git a/endpoints/web.py b/endpoints/web.py
index 7727c8116..15f7261a3 100644
--- a/endpoints/web.py
+++ b/endpoints/web.py
@@ -678,7 +678,7 @@ def redirect_to_repository(namespace_name, repo_name, tag_name):
if permission.can() or is_public:
repo_path = '/'.join([namespace_name, repo_name])
- return redirect(url_for('web.repository', path=repo_path, tag=tag_name))
+ return redirect(url_for('web.repository', path=repo_path, tab="tags", tag=tag_name))
abort(404)
diff --git a/util/jinjautil.py b/util/jinjautil.py
index 82e50020a..b846fc568 100644
--- a/util/jinjautil.py
+++ b/util/jinjautil.py
@@ -41,8 +41,8 @@ def repository_tag_reference(repository_path_and_tag):
if not owner:
return tag
- return """%s""" % (get_app_url(), namespace, repository,
- tag, tag)
+ return """%s""" % (get_app_url(), namespace,
+ repository, tag, tag)
def repository_reference(pair):
if isinstance(pair, tuple):