fix output not returned