diff --git a/templates/exception.html.ep b/templates/exception.html.ep
index d90acf5..930483b 100644
--- a/templates/exception.html.ep
+++ b/templates/exception.html.ep
@@ -1,2 +1,3 @@
% layout "main";
% title "Error";
+
<%= title %>
diff --git a/templates/gallery.html.ep b/templates/gallery.html.ep
index c3d2f59..770ed3c 100644
--- a/templates/gallery.html.ep
+++ b/templates/gallery.html.ep
@@ -1,4 +1,5 @@
% layout "main";
+<%= title %>
% for my $m ($media->@*) {
@@ -7,3 +8,5 @@
<% end %>
% }
+
+%= include "_pager";
diff --git a/templates/layouts/main.html.ep b/templates/layouts/main.html.ep
index 2b9d4c0..8a46b70 100644
--- a/templates/layouts/main.html.ep
+++ b/templates/layouts/main.html.ep
@@ -18,13 +18,7 @@
-% if (defined title) {
-
<%= title %>
-% }
-
%= content
-
-%= include "_pager"