fixes to print_object and tag_of