diff --git a/view/templates/photo_view.tpl b/view/templates/photo_view.tpl
index 4f5be40fc..372bcb536 100644
--- a/view/templates/photo_view.tpl
+++ b/view/templates/photo_view.tpl
@@ -11,9 +11,9 @@
{{if $lock}} |
{{/if}}
-{{if $prevlink}}
{{/if}}
+{{if $prevlink}}{{/if}}
-{{if $nextlink}}{{/if}}
+{{if $nextlink}}{{/if}}
{{$desc nofilter}}
{{if $tags}}
diff --git a/view/theme/quattro/templates/photo_view.tpl b/view/theme/quattro/templates/photo_view.tpl
index 0b65c2c53..a4787270f 100644
--- a/view/theme/quattro/templates/photo_view.tpl
+++ b/view/theme/quattro/templates/photo_view.tpl
@@ -11,8 +11,8 @@
-{{if $prevlink}}{{/if}}
-{{if $nextlink}}{{/if}}
+{{if $prevlink}}{{/if}}
+{{if $nextlink}}{{/if}}
{{$desc nofilter}}
{{if $tags}}
{{$tags.0}}
diff --git a/view/theme/vier/templates/photo_view.tpl b/view/theme/vier/templates/photo_view.tpl
index aa3f7aadd..617bcc5b2 100644
--- a/view/theme/vier/templates/photo_view.tpl
+++ b/view/theme/vier/templates/photo_view.tpl
@@ -11,9 +11,9 @@
{{if $lock}} |
{{/if}}
-{{if $prevlink}}{{/if}}
+{{if $prevlink}}{{/if}}
-{{if $nextlink}}{{/if}}
+{{if $nextlink}}{{/if}}
{{$desc nofilter}}
{{if $tags}}