Fix a silly mistake in the logic.