Infinite stacks fix