fix for pagination to always center the active page