Added TStream, fixed a bug.