Fixed tostring method.