Fix pagination link

Pagination links in the generated modules didn't work. This should fix it.