fixed pagination bug not showing the page number before the last one.
A slight modification: the '...' is omitted when the last page is within
the last five pages