IE7 js error fix

IE7 doesn't allow access to char in a string using index
Merge pull request #570 from majesticcpan/master

IE7 js error fix