fix bug when writing array of numeric, text or name