diff --git a/view/templates/photo_view.tpl b/view/templates/photo_view.tpl
index 4f5be40fc5..372bcb536e 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 0b65c2c535..a4787270fe 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 aa3f7aadd5..617bcc5b25 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}}