Fix array parsing code