fixed some bugs in streaming out function and function call