Mistake in an undefined check