.charAt(0) instead of [0] to make IE happy