Use correct argument name for WaitForSingleObject call