fixed potentially invalid string pointers when parsing options