Fixes pagination links issue.