Added some garbage collection for gen stacks