Fixing pagination.