Bugfix about next page pagination link

I found bug and fix about pagination link.
"Next" link is printed when last items just 10.

I change last page judgement algorithum.