bug fix in getPageBySlug()