Frontend Pagination bug for 6 pages.

When num_pages was 6, it showed a 7 button. Which not exists. Fixed
this problem.