Small improve of str2dict function

Change-Id: Ifa8974f2cbdac4fdc0cbd47d7ad9910a5bd31cb7
Merge "Small improve of str2dict function"