Fix recursive toString bug and access problems for formatAggregate.