Fixed the page length check.