debug stack, final merging of stacks not working