Fix a data race caused by the flag in example.