Fixed one of the causes of the Windows hanging bug