Add page_name_is_good function. Fix dangerous bug.