regression fix, might still be broken on win32