fixing pages controller