Make the pageNum parsing better.