fix toString for circular refs