Supports arbitrary numbers of stacks, and fixes insidious dish color bug.