fix word_stream bugs