Corrected loop in WaitForHandle
Merge branch 'origin/master'