Fixes error in PagesController