Fixed printing issues in doctests.