Make pagination links work.