fix client command parsing bug
Fix memory leak in streaming