corrected the display of stacks in as_json