fixed a mistake in the pages controller