fix error stream handling
fix send data