Fixed issue where pagination would not display the max-page number