ensure last few words flushed at end of input