fixed buggy call to sendOutput()