fix a mistake in a logic condition