Fix bstream error in partial write.