Resolve getopt bug.
Reset optind variable to 0.