Fix duplicate percentString2 function