fixed so TableToString preserves array order