IOStream bugfix