Fixed an error in the Windows patch code