Fixing error with Stream. Improving charset recognition a little bit.