Bug in pagination (first and last links)

Fixed bug with First page and last page. Only one appears with the correct link. The other pages appear with the default link.

Let me know if you have any doubt.