changed page type check logic in page preprocess