Fix name.charAt error the right way.