Fix the array type detection.