don't allocate a bunch of memory on the stack + other windows fixes