improve validation of page structure
Merge pull request #53 from ray176/validatePagePositionImprovement

improve validation of page structure