fix matrix to String format