fix set of stacks bug