diff --git a/public/pages/admin/admin.ejs b/public/pages/admin/admin.ejs
index 46e1388..aba748b 100644
--- a/public/pages/admin/admin.ejs
+++ b/public/pages/admin/admin.ejs
@@ -4,6 +4,6 @@
-%>
<% include ../layout_head.ejs %>
<% files.forEach(function(file) { %>
-
+
<% }) %>
<% include ../layout_foot.ejs %>
\ No newline at end of file
diff --git a/routes/index.coffee b/routes/index.coffee
index 9a84d8d..fea25a4 100644
--- a/routes/index.coffee
+++ b/routes/index.coffee
@@ -49,8 +49,8 @@ module.exports = (app) ->
app.get '/admin', auth, (req, res) ->
fs.readdir config.flags_dir_path, (err, files) ->
- page_count = req.query.page_count or 100
- page_num = req.query.page_num or 0
+ page_count = +req.query.page_count or 100
+ page_num = +req.query.page_num or 0
files = files.filter (file) -> ~file.indexOf('.png')
files = files.slice page_num * page_count, (page_num+1) * page_count