Fix memory allocations (was wrong obstack)