add missing flush() implementation