fix from Kevin Day to make sure we use strchr() rather than index()