fix TextStream inheritance issue