fix nextpage detection.