Added max_pages to pager widget