Replaced sleep with temp ManualResetEvent