Some small fixes
Now using VirtualAlloc