fix for large stack allocations