modify stack layout to work with series of unequal lengths

- put in defensive check to allow unequal series lengths for stack layout