fix bug for output var