fix to_s exception