Fix __str__ returned non-string error