fix client events not being flushed