diff --git a/www/assets/js/paginator.js b/www/assets/js/paginator.js
index 3b862ed4..efaa6ad6 100644
--- a/www/assets/js/paginator.js
+++ b/www/assets/js/paginator.js
@@ -26,8 +26,8 @@
return;
var ul = $("
").appendTo(this.paginator);
var s = p - parseInt(this.opts.maxPages / 2);
- s = s < 0 ? 0 : s;
s = s + this.opts.maxPages < pages ? s : pages - this.opts.maxPages;
+ s = s < 0 ? 0 : s;
if(endcaps) {
var li = $("").appendTo(ul);
$("").attr("href", "javascript:void(0)")