Fixed race condition in DynamicExperimentThread.