fixed mistake in the pages controller