fix flush bug with externalizable, streaming write