Remove unneeded calls to flush events.