Fix tests for pagination