Use `charAt(0)` instead of `[0]`
Because IE7 does not support the latter one.