debugging race condition in control