Fix name.charAt error.