CW: Better page number processing.