fix to_str issue
fix a bug of retry logic