perplexing pagination problem