fix matrix / array parsing