IOStream: bugfix