Ahem. Some string manipulation errors.  Don't ask for substring index
that's out of range for the string.