Protect role with flush_handlers