Fix SequenceFileStream bugs