replaced Characters::kBadStringIndex with Characters::String::kBadIndex