fixed typo in _flush