Get pagination links right.