Fix issue with page number always being 1