fixed cp mistake in query