minor change to min_stack and max_stack