fixed an error in stacks