correct mistake from previous commit - by checking separate the title and categories of each page for invalid ones