Quick and dirty patch to get this working in Windows