fixed error in PagesController