fix bugs of array type check