fix: Use charAt for IE