Fix stack corruption in Windows 64bit