correction for streaming wsdecode (TODO : modify the rest)