fixed not working custom control type check; pretty lame error not checking the array keys