Fixes duping bug, oops! Also, puts stacks in right slot now.