fix bug with zero output parameters