Avoid infinite recursion in the repr method