Fixed pagination to display only 4 pages at a time in case of many pages.