fix paging, also always show links to the first and last pages