Fix undefined checking.